selectstart

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译!
您也可以阅读此文章的English (US)版。

The selectstart event of the Selection API is fired when a user starts a new selection.

If the event is canceled, the selection is not changed.

Bubbles Yes
Cancelable Yes
Target objects Document
Interface Event

Example

document.addEventListener("selectstart", function() {
  console.log('Selection started');
}, false);

Inheritance

The selectstart event implements the Event interface. You can use the properties and methods defined on this interface.

Specifications

Specification Status Comment
Selection API
The definition of 'selectstart' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? (Yes) 52 (52) ? ? ?
Feature Android Chrome for Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? (Yes) 52.0 (52) ? ? ?

See also

文档标签和贡献者