Selection.collapseToEnd()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
Selection.collapseToEnd()
方法的作用是取消当前选区,并把光标定位在原选区的最末尾处,如果此时光标所处的位置是可编辑的,且它获得了焦点,则光标会在原地闪烁。
语法
sel.collapseToEnd()
参数
无
规范
Specification |
---|
Selection API # dom-selection-collapsetoend |
浏览器兼容性
BCD tables only load in the browser