Skip to content

Commit

Permalink
Move oncopy/oncut/onpaste to GlobalEventHandlers
Browse files Browse the repository at this point in the history
Fixes #8053.
  • Loading branch information
foolip committed Dec 21, 2022
1 parent 085d4d1 commit 045b5c2
Showing 1 changed file with 7 additions and 31 deletions.
38 changes: 7 additions & 31 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -10098,8 +10098,7 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {

// <a href="#Document-partial">also has obsolete members</a>
};
<span>Document</span> includes <span>GlobalEventHandlers</span>;
<span>Document</span> includes <span>DocumentAndElementEventHandlers</span>;</code></pre>
<span>Document</span> includes <span>GlobalEventHandlers</span>;</code></pre>

<p>Each <code>Document</code> has a <dfn data-x="concept-document-policy-container" export
for="Document">policy container</dfn> (a <span>policy container</span>), initially a new policy
Expand Down Expand Up @@ -11127,7 +11126,6 @@ interface <dfn interface>HTMLElement</dfn> : <span>Element</span> {
};

<span>HTMLElement</span> includes <span>GlobalEventHandlers</span>;
<span>HTMLElement</span> includes <span>DocumentAndElementEventHandlers</span>;
<span>HTMLElement</span> includes <span>ElementContentEditable</span>;
<span>HTMLElement</span> includes <span>HTMLOrSVGElement</span>;

Expand Down Expand Up @@ -101122,7 +101120,9 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn typedef>OnBeforeUnl
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-oncontextlost">oncontextlost</code></dfn> <td> <code data-x="event-contextlost">contextlost</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-oncontextmenu">oncontextmenu</code></dfn> <td> <code data-x="event-contextmenu">contextmenu</code> <!-- widely used -->
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-oncontextrestored">oncontextrestored</code></dfn> <td> <code data-x="event-contextrestored">contextrestored</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-oncopy">oncopy</code></dfn> <td> <code data-x="event-copy">copy</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-oncuechange">oncuechange</code></dfn> <td> <code data-x="event-media-cuechange">cuechange</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-oncut">oncut</code></dfn> <td> <code data-x="event-cut">cut</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-ondblclick">ondblclick</code></dfn> <td> <code data-x="event-dblclick">dblclick</code> <!-- widely used -->
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-ondrag">ondrag</code></dfn> <td> <code data-x="event-dnd-drag">drag</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-ondragend">ondragend</code></dfn> <td> <code data-x="event-dnd-dragend">dragend</code>
Expand Down Expand Up @@ -101150,6 +101150,7 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn typedef>OnBeforeUnl
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onmouseout">onmouseout</code></dfn> <td> <code data-x="event-mouseout">mouseout</code> <!-- widely used -->
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onmouseover">onmouseover</code></dfn> <td> <code data-x="event-mouseover">mouseover</code> <!-- widely used -->
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onmouseup">onmouseup</code></dfn> <td> <code data-x="event-mouseup">mouseup</code> <!-- widely used -->
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onpaste">onpaste</code></dfn> <td> <code data-x="event-paste">paste</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onpause">onpause</code></dfn> <td> <code data-x="event-media-pause">pause</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onplay">onplay</code></dfn> <td> <code data-x="event-media-play">play</code>
<tr><td><dfn attribute for="HTMLElement,Document,Window,GlobalEventHandlers"><code data-x="handler-onplaying">onplaying</code></dfn> <td> <code data-x="event-media-playing">playing</code>
Expand All @@ -101176,8 +101177,6 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn typedef>OnBeforeUnl

<!-- not supported, use dnd: -->
<!--<tr><td><dfn><code data-x="handler-onbeforecopy">onbeforecopy</code></dfn> <td> <code data-x="event-cp-beforecopy">beforecopy</code>--> <!-- widely used -->
<!--<tr><td><dfn attribute for="DocumentAndElementEventHandlers"><code data-x="handler-oncopy">oncopy</code></dfn> <td> <code data-x="event-cp-copy">copy</code>--> <!-- widely used -->
<!--<tr><td><dfn attribute for="DocumentAndElementEventHandlers"><code data-x="handler-onpaste">onpaste</code></dfn> <td> <code data-x="event-cp-paste">paste</code>--> <!-- widely used -->
<!-- not supported yet (v2?): -->
<!--<tr><td><dfn><code data-x="handler-onselectstart">onselectstart</code></dfn> <td> <code data-x="event-selectstart">selectstart</code>--> <!-- widely used -->
</table>
Expand Down Expand Up @@ -101250,26 +101249,6 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn typedef>OnBeforeUnl

<hr>

<p>The following are the <span>event handlers</span> (and their corresponding <span
data-x="event handler event type">event handler event types</span>) <span w-nodev>that must be</span>
supported by all <span>HTML elements</span>, as both <span>event handler content attributes</span>
and <span>event handler IDL attributes</span>; and <span w-nodev>that must be</span>
supported by all <code>Document</code> objects, as <span>event handler IDL attributes</span>:</p>

<table>
<thead>
<tr><th><span data-x="event handlers">Event handler</span> <th><span>Event handler event type</span>
<tbody>
<tr><td><dfn attribute for="DocumentAndElementEventHandlers"><code data-x="handler-oncut">oncut</code></dfn> <td> <code data-x="event-cut">cut</code>
<tr><td><dfn attribute for="DocumentAndElementEventHandlers"><code data-x="handler-oncopy">oncopy</code></dfn> <td> <code data-x="event-copy">copy</code>
<tr><td><dfn attribute for="DocumentAndElementEventHandlers"><code data-x="handler-onpaste">onpaste</code></dfn> <td> <code data-x="event-paste">paste</code>
</table>

<p w-nodev>This list of <span>event handlers</span> is reified as <span>event handler IDL
attributes</span> through the <code>DocumentAndElementEventHandlers</code> interface mixin.</p>

<hr>

<p>The following are the <span>event handlers</span> (and their corresponding <span data-x="event
handler event type">event handler event types</span>) <span w-nodev>that must be</span>
supported on <code>Document</code> objects as <span>event handler IDL attributes</span>:</p>
Expand Down Expand Up @@ -101310,7 +101289,9 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn typedef>OnBeforeUnl
attribute <span>EventHandler</span> <span data-x="handler-oncontextlost">oncontextlost</span>;
attribute <span>EventHandler</span> <span data-x="handler-oncontextmenu">oncontextmenu</span>;
attribute <span>EventHandler</span> <span data-x="handler-oncontextrestored">oncontextrestored</span>;
attribute <span>EventHandler</span> <span data-x="handler-oncopy">oncopy</span>;
attribute <span>EventHandler</span> <span data-x="handler-oncuechange">oncuechange</span>;
attribute <span>EventHandler</span> <span data-x="handler-oncut">oncut</span>;
attribute <span>EventHandler</span> <span data-x="handler-ondblclick">ondblclick</span>;
attribute <span>EventHandler</span> <span data-x="handler-ondrag">ondrag</span>;
attribute <span>EventHandler</span> <span data-x="handler-ondragend">ondragend</span>;
Expand Down Expand Up @@ -101341,6 +101322,7 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn typedef>OnBeforeUnl
attribute <span>EventHandler</span> <span data-x="handler-onmouseout">onmouseout</span>;
attribute <span>EventHandler</span> <span data-x="handler-onmouseover">onmouseover</span>;
attribute <span>EventHandler</span> <span data-x="handler-onmouseup">onmouseup</span>;
attribute <span>EventHandler</span> <span data-x="handler-onpaste">onpaste</span>;
attribute <span>EventHandler</span> <span data-x="handler-onpause">onpause</span>;
attribute <span>EventHandler</span> <span data-x="handler-onplay">onplay</span>;
attribute <span>EventHandler</span> <span data-x="handler-onplaying">onplaying</span>;
Expand Down Expand Up @@ -101386,12 +101368,6 @@ interface mixin <dfn interface>WindowEventHandlers</dfn> {
attribute <span>EventHandler</span> <span data-x="handler-window-onstorage">onstorage</span>;
attribute <span>EventHandler</span> <span data-x="handler-window-onunhandledrejection">onunhandledrejection</span>;
attribute <span>EventHandler</span> <span data-x="handler-window-onunload">onunload</span>;
};

interface mixin <dfn interface>DocumentAndElementEventHandlers</dfn> {
attribute <span>EventHandler</span> <span data-x="handler-oncopy">oncopy</span>;
attribute <span>EventHandler</span> <span data-x="handler-oncut">oncut</span>;
attribute <span>EventHandler</span> <span data-x="handler-onpaste">onpaste</span>;
};</code></pre>

<h5>Event firing</h5>
Expand Down

0 comments on commit 045b5c2

Please sign in to comment.