Skip to content

Commit

Permalink
Adapt selectstart/selectionchange events to new event structure
Browse files Browse the repository at this point in the history
Part of mdn#7545.
  • Loading branch information
foolip committed Jul 7, 2022
1 parent 61d1225 commit a768b02
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 123 deletions.
43 changes: 4 additions & 39 deletions api/Document.json
Original file line number Diff line number Diff line change
Expand Up @@ -7055,7 +7055,10 @@
"__compat": {
"description": "<code>selectionchange</code> event",
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Document/selectionchange_event",
"spec_url": "https://w3c.github.io/selection-api/#selectionchange-event",
"spec_url": [
"https://w3c.github.io/selection-api/#selectionchange-event",
"https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectionchange"
],
"support": {
"chrome": {
"version_added": "11"
Expand Down Expand Up @@ -7091,44 +7094,6 @@
}
}
},
"selectstart_event": {
"__compat": {
"description": "<code>selectstart</code> event",
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Document/selectstart_event",
"spec_url": "https://w3c.github.io/selection-api/#selectstart-event",
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "52"
},
"firefox_android": "mirror",
"ie": {
"version_added": "4"
},
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": "1.3"
},
"safari_ios": {
"version_added": false
},
"samsunginternet_android": "mirror",
"webview_android": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
},
"styleSheetSets": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Document/styleSheetSets",
Expand Down
78 changes: 0 additions & 78 deletions api/GlobalEventHandlers.json
Original file line number Diff line number Diff line change
Expand Up @@ -2480,84 +2480,6 @@
}
}
},
"onselectionchange": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers/onselectionchange",
"spec_url": "https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectionchange",
"support": {
"chrome": {
"version_added": "11"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "52"
},
"firefox_android": "mirror",
"ie": {
"version_added": "5.5"
},
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": "5.1"
},
"safari_ios": {
"version_added": "5"
},
"samsunginternet_android": "mirror",
"webview_android": {
"version_added": "≤37"
}
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
},
"onselectstart": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers/onselectstart",
"spec_url": "https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectstart",
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "52"
},
"firefox_android": "mirror",
"ie": {
"version_added": "4"
},
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": "1.3"
},
"safari_ios": {
"version_added": "1",
"partial_implementation": true,
"notes": "The <code>selectstart</code> event never fires and never invokes this handler."
},
"samsunginternet_android": "mirror",
"webview_android": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
},
"onshow": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers/onshow",
Expand Down
7 changes: 5 additions & 2 deletions api/HTMLInputElement.json
Original file line number Diff line number Diff line change
Expand Up @@ -1510,11 +1510,14 @@
"__compat": {
"description": "<code>selectionchange</code> event",
"mdn_url": "https://developer.mozilla.org/docs/Web/API/HTMLInputElement/selectionchange_event",
"spec_url": "https://w3c.github.io/selection-api/#selectionchange-event",
"spec_url": [
"https://w3c.github.io/selection-api/#selectionchange-event",
"https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectionchange"
],
"support": {
"chrome": {
"version_added": false,
"notes": "See <a href='https://crbug.com/1327098'>bug 1327098</a>."
"notes": "A <code>selectionchange</code> event is fired on <code>Document</code>, see <a href='https://developer.mozilla.org/docs/Web/API/Document/selectionchange_event'><code>Document</code>'s <code>selectionchange</code> event</a>. See <a href='https://crbug.com/1327098'>bug 1327098</a> for firing the event on <code>&lt;input&gt;</code> elements."
},
"chrome_android": "mirror",
"edge": {
Expand Down
7 changes: 5 additions & 2 deletions api/HTMLTextAreaElement.json
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,14 @@
"__compat": {
"description": "<code>selectionchange</code> event",
"mdn_url": "https://developer.mozilla.org/docs/Web/API/HTMLTextAreaElement/selectionchange_event",
"spec_url": "https://w3c.github.io/selection-api/#selectionchange-event",
"spec_url": [
"https://w3c.github.io/selection-api/#selectionchange-event",
"https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectionchange"
],
"support": {
"chrome": {
"version_added": false,
"notes": "See <a href='https://crbug.com/1327098'>bug 1327098</a>."
"notes": "A <code>selectionchange</code> event is fired on <code>Document</code>, see <a href='https://developer.mozilla.org/docs/Web/API/Document/selectionchange_event'><code>Document</code>'s <code>selectionchange</code> event</a>. See <a href='https://crbug.com/1327098'>bug 1327098</a> for firing the event on <code>&lt;textarea&gt;</code> elements."
},
"chrome_android": "mirror",
"edge": {
Expand Down
53 changes: 53 additions & 0 deletions api/Node.json
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,59 @@
}
}
},
"selectstart_event": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Node/selectstart_event",
"spec_url": [
"https://w3c.github.io/selection-api/#selectstart-event",
"https://w3c.github.io/selection-api/#dom-globaleventhandlers-onselectstart"
],
"description": "<code>selectstart</code> event",
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": {
"version_added": "18"
},
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "52"
},
"firefox_android": {
"version_added": "52"
},
"ie": {
"version_added": "5"
},
"opera": {
"version_added": "15"
},
"opera_android": {
"version_added": "14"
},
"safari": {
"version_added": "1.3"
},
"safari_ios": {
"version_added": false
},
"samsunginternet_android": {
"version_added": "1.0"
},
"webview_android": {
"version_added": "1"
}
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
},
"textContent": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Node/textContent",
Expand Down
3 changes: 1 addition & 2 deletions api/Selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"version_added": "12"
},
"firefox": {
"version_added": "1",
"notes": "The <a href='https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers/onselectionchange'><code>GlobalEventHandlers.onselectionchange</code></a> and <a href='https://developer.mozilla.org/docs/Web/API/GlobalEventHandlers/onselectstart'><code>GlobalEventHandlers.onselectstart</code></a> event handlers are supported as of Firefox 52."
"version_added": "1"
},
"firefox_android": "mirror",
"ie": {
Expand Down

0 comments on commit a768b02

Please sign in to comment.