Skip to content

Commit

Permalink
Clean up the events index
Browse files Browse the repository at this point in the history
Implement the rule suggested in #8340 to have the events table only include events that the HTML spec actually fires.

* Drop contextmenu, copy, cut, paste, securitypolicyviolation, and slotchange entries from the table.
* Add a pointercancel entry to the table.
* Reference the original definitions of copy, cut, paste, securitypolicyviolation, and slotchange, in their own specs.
* Drop a reference to Page Visibility and drop Page Visibility from the list of references.
* Add introductory text to the index, mentioning that the list completes the media element events list and drag-and-drop events list. This replaces the note that previously followed the table.

Closes #8340.
  • Loading branch information
dontcallmedom committed Oct 7, 2022
1 parent 281f436 commit 627ee28
Showing 1 changed file with 22 additions and 43 deletions.
65 changes: 22 additions & 43 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3091,6 +3091,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#dom-shadowroot-slot-assignment">slot assignment</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-slotable">slottable</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#assign-slotables-for-a-tree">assign slottables for a tree</dfn> algorithm</li>
<li>The <dfn data-x="event-slotchange" data-x-href="https://dom.spec.whatwg.org/#eventdef-htmlslotelement-slotchange"><code>slotchange</code></dfn> event</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-tree-inclusive-descendant">inclusive descendant</dfn> concept</li>
<li>The <dfn data-x="finding flattened slottables" data-x-href="https://dom.spec.whatwg.org/#find-flattened-slotables">find flattened slottables</dfn> algorithm</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#slottable-manual-slot-assignment">manual slot assignment</dfn> concept</li>
Expand Down Expand Up @@ -3227,6 +3228,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x="event-pointercancel" data-x-href="https://w3c.github.io/pointerevents/#the-pointercancel-event"><code>pointercancel</code></dfn> event</li>
</ul>

<p>The following events are defined in <cite>Clipboard API and events</cite>: <ref spec=CLIPBOARD-APIS></p>

<ul class="brief">
<li><dfn data-x="event-copy" data-x-href="https://w3c.github.io/clipboard-apis/#clipboard-event-copy"><code>copy</code></dfn> event</li>
<li><dfn data-x="event-cut" data-x-href="https://w3c.github.io/clipboard-apis/#clipboard-event-cut"><code>cut</code></dfn> event</li>
<li><dfn data-x="event-paste" data-x-href="https://w3c.github.io/clipboard-apis/#clipboard-event-paste"><code>paste</code></dfn> event</li>
</ul>

<p>This specification sometimes uses the term <dfn data-x="">name</dfn> to refer to the event's
<span data-x="concept-event-type">type</span>; as in, "an event named <code
data-x="">click</code>" or "if the event name is <code data-x="">keypress</code>". The terms
Expand Down Expand Up @@ -4114,6 +4123,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x-href="https://w3c.github.io/webappsec-csp/#contains-a-header-delivered-content-security-policy">contains a header-delivered Content Security Policy</dfn> property.</li>
<li>The <dfn data-x="parse-response-csp" data-x-href="https://w3c.github.io/webappsec-csp/#parse-response-csp">Parse a response's Content Security Policies</dfn> algorithm.</li>
<li><dfn data-x-href="https://w3c.github.io/webappsec-csp/#securitypolicyviolationevent"><code>SecurityPolicyViolationEvent</code></dfn> interface</li>
<li>The <dfn data-x="event-securitypolicyviolation" data-x-href="https://w3c.github.io/webappsec-csp/#eventdef-globaleventhandlers-securitypolicyviolation"><code>securitypolicyviolation</code></dfn> event</li>
</ul>
</dd>

Expand Down Expand Up @@ -127754,6 +127764,10 @@ INSERT INTERFACES HERE

<!-- NON-NORMATIVE SECTION -->

<p>The following table lists events fired by this document, excluding those
already defined in <a href="#mediaevents">media element events</a> and
<a href="#dndevents">drag-and-drop events</a>.</p>

<table>
<caption>List of events</caption>
<thead>
Expand Down Expand Up @@ -127838,31 +127852,12 @@ INSERT INTERFACES HERE
<td> <code>canvas</code> elements, <code>OffscreenCanvas</code> objects
<td> Fired when the corresponding <code>CanvasRenderingContext2D</code> or <code>OffscreenCanvasRenderingContext2D</code> is lost

<tr> <!-- contextmenu -->
<td> <code data-x="event-contextmenu">contextmenu</code>
<td> <code>PointerEvent</code>
<td> Elements
<td> Fired at elements when the user requests their context menu

<tr> <!-- contextrestore -->
<td> <dfn event for="HTMLElement,OffscreenCanvas"><code data-x="event-contextrestored">contextrestored</code></dfn>
<td> <code>Event</code>
<td> <code>canvas</code> elements, <code>OffscreenCanvas</code> objects
<td> Fired when the corresponding <code>CanvasRenderingContext2D</code> or <code>OffscreenCanvasRenderingContext2D</code> is restored after being lost

<tr> <!-- copy -->
<td> <dfn event for="HTMLElement"><code data-x="event-copy">copy</code></dfn>
<td> <code>Event</code>
<td> Elements
<td> Fired at elements when the user copies data to the clipboard

<tr> <!-- cut -->
<td> <dfn event for="HTMLElement"><code data-x="event-cut">cut</code></dfn>
<td> <code>Event</code>
<td> Elements
<td> Fired at elements when the user copies the selected data on the clipboard and removes the
selection from the document

<tr> <!-- error -->
<td> <dfn event for="Window,WorkerGlobalScope,HTMLElement,EventSource,Worker,SharedWorker,AbstractWorker"><code data-x="event-error">error</code></dfn>
<td> <code>Event</code> or <code>ErrorEvent</code>
Expand All @@ -127888,7 +127883,7 @@ INSERT INTERFACES HERE
<td> Fired at the <code>Window</code> when the <span data-x="concept-url-fragment">fragment</span> part of the document's <span data-x="concept-document-url">URL</span> changes

<tr> <!-- input -->
<td> <span><code data-x="event-input" id="event-input-input">input</code></span>
<td> <span><code data-x="event-input">input</code></span>
<td> <code>Event</code>
<td> Elements
<td> Fired when the user changes the <code data-x="attr-contenteditable">contenteditable</code> element's content, or the form control's value. See also the <code data-x="event-change">change</code> event for form controls.
Expand Down Expand Up @@ -127953,12 +127948,11 @@ INSERT INTERFACES HERE
<td> <code>Window</code>
<td> Fired at the <code>Window</code> when the page's entry in the <span>session history</span> becomes the <span>current entry</span>

<tr> <!-- paste -->
<td> <dfn event for="HTMLElement"><code data-x="event-paste">paste</code></dfn>
<tr> <!-- pointercancel -->
<td> <span><code data-x="event-pointercancel">pointercancel</code></span>
<td> <code>Event</code>
<td> Elements
<td> Fired at elements when the user will insert the clipboard data in the most suitable
format (if any) supported for the given context
<td> Fired at the <span>source node</span> when the user attempts to initiate a drag-and-drop operation.

<tr> <!-- popstate -->
<td> <dfn event for="Window"><code data-x="event-popstate">popstate</code></dfn>
Expand All @@ -127984,24 +127978,12 @@ INSERT INTERFACES HERE
<td> <code>form</code> elements
<td> Fired at a <code>form</code> element when it is <span data-x="concept-form-reset">reset</span>

<tr> <!-- securitypolicyviolation -->
<td> <dfn event for="HTMLElement"><code data-x="event-securitypolicyviolation">securitypolicyviolation</code></dfn>
<td> <code>SecurityPolicyViolationEvent</code>
<td> Elements
<td> Fired at elements when a Content Security Policy violation is generated <ref spec=CSP>

<tr> <!-- select -->
<td> <dfn event for="HTMLElement"><code data-x="event-select">select</code></dfn>
<td> <code>Event</code>
<td> Form controls
<td> Fired at form controls when their text selection is adjusted (whether by an API or by the user)

<tr> <!-- slotchange -->
<td> <dfn event for="HTMLSlotElement"><code data-x="event-slotchange">slotchange</code></dfn>
<td> <code>Event</code>
<td> <code>slot</code> elements
<td> Fired at <code>slot</code> elements when their <span>assigned nodes</span> change

<tr> <!-- storage -->
<td> <dfn event for="Window"><code data-x="event-storage">storage</code></dfn>
<td> <code>StorageEvent</code>
Expand Down Expand Up @@ -128037,13 +128019,10 @@ INSERT INTERFACES HERE
<td> <code>Event</code>
<td> <code>Document</code>
<td> Fired at the <code>Document</code> object when the page becomes visible or hidden to the
user. <ref spec=PAGEVIS>
user.

</table>

<p class="note">See also <a href="#mediaevents">media element events</a> and <a
href="#dndevents">drag-and-drop events</a>.</p>


<h3 class="no-num">HTTP headers</h3>

Expand Down Expand Up @@ -128222,6 +128201,9 @@ INSERT INTERFACES HERE
<dt id="refsCHARMODNORM">[CHARMODNORM]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/charmod-norm/">Character Model for the World Wide Web: String Matching</a></cite>, A. Phillips. W3C.</dd>

<dt id="refsCLIPBOARD-APIS">[CLIPBOARD-APIS]</dt>
<dd><cite><a href="https://w3c.github.io/clipboard-apis/">Clipboard API and events</a></cite>, G. Kacmarcik, A. Snigdha. W3C.</dd>

<dt id="refsCOMPOSITE">[COMPOSITE]</dt>
<dd><cite><a href="https://drafts.fxtf.org/compositing/">Compositing and Blending</a></cite>, R. Cabanier, N. Andronikos. W3C.</dd>

Expand Down Expand Up @@ -128547,9 +128529,6 @@ INSERT INTERFACES HERE
<dt id="refsPAINTTIMING">[PAINTTIMING]</dt>
<dd><cite><a href="https://w3c.github.io/paint-timing/">Paint Timing</a></cite>, S. Panicker. W3C.</dd>

<dt id="refsPAGEVIS">[PAGEVIS]</dt>
<dd>(Non-normative) <cite><a href="https://w3c.github.io/page-visibility/">Page Visibility Level 2</a></cite>, I. Grigorik, A. Jain, J. Mann. W3C.</dd>

<dt id="refsPAYMENTREQUEST">[PAYMENTREQUEST]</dt>
<dd><cite><a href="https://w3c.github.io/payment-request/">Payment Request API</a></cite>, M. Cáceres, D. Wang, R. Solomakhin, I. Jacobs. W3C.</dd>

Expand Down

0 comments on commit 627ee28

Please sign in to comment.