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 |
document.addEventListener("selectstart", function() { console.log('Selection started'); }, false);
The selectstart
event implements the Event
interface. You can use the properties and methods defined on this interface.
Specification | Status | Comment |
---|---|---|
Selection API The definition of 'selectstart' in that specification. | Working Draft | Initial definition. |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | ? | 52 (52) | ? | ? | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | ? | 52.0 (52) | ? | ? | ? |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/Events/selectstart