Skip to content

Add more legacy event types for createEvent() #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4919,21 +4919,43 @@ invoked, must run these steps:
<thead>
<tr><th>String<th>Interface<td>Notes
<tbody>
<tr><td>"<code>customevent</code>"<td>{{CustomEvent}}<td rowspan=4>
<tr><td>"<code>event</code><td rowspan=3>{{Event}}
<tr><td>"<code>animationevent</code>"<td>{{AnimationEvent}}<td>[[!CSS3-ANIMATIONS]]
<tr><td>"<code>beforeunloadevent</code>"<td>{{BeforeUnloadEvent}}<td rowspan=2>[[!HTML]]
<tr><td>"<code>closeevent</code>"<td>{{CloseEvent}}
<tr><td>"<code>compositionevent</code>"<td>{{CompositionEvent}}<td>[[!UIEVENTS]]
<!-- textevent also maps to CompositionEvent -->
<tr><td>"<code>customevent</code>"<td>{{CustomEvent}}<td>
<tr><td>"<code>devicemotionevent</code>"<td>{{DeviceMotionEvent}}<td rowspan=2>[[!DEVICE-ORIENTATION]]
<tr><td>"<code>deviceorientationevent</code>"<td>{{DeviceOrientationEvent}}
<tr><td>"<code>dragevent</code>"<td>{{DragEvent}}<td rowspan=2>[[!HTML]]
<tr><td>"<code>errorevent</code>"<td>{{ErrorEvent}}
<tr><td>"<code>event</code>"<td rowspan=2>{{Event}}<td rowspan=2>
<tr><td>"<code>events</code>"
<tr><td>"<code>htmlevents</code>"
<!-- htmlevents and svgevent also map to Event -->
<tr><td>"<code>focusevent</code>"<td>{{FocusEvent}}<td>[[!UIEVENTS]]
<tr><td>"<code>hashchangeevent</code>"<td>{{HashChangeEvent}}<td>[[!HTML]]
<tr><td>"<code>htmlevents</code>"<td>{{Event}}<td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be clearer to keep this grouped with "event" and "events" and ignore it for sorting purposes. Same for "svgevent" below, didn't know that was a thing. Sad times.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that, but decided it would be confusing if the reader were trying to check if an event is on the list, and that that outweighs the benefit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though, maybe note that in the source somehow, so that folks don't try to patch it up.

<tr><td>"<code>idbversionchangeevent</code>"<td>{{IDBVersionChangeEvent}}<td>[[INDEXEDDB]]
<tr><td>"<code>keyboardevent</code>"<td>{{KeyboardEvent}}<td>[[!UIEVENTS]]
<tr><td>"<code>messageevent</code>"<td>{{MessageEvent}}<td>[[!HTML]]
<tr><td>"<code>mouseevent</code>"<td rowspan=2>{{MouseEvent}}<td rowspan=2>[[!UIEVENTS]]
<tr><td>"<code>mouseevents</code>"
<tr><td>"<code>pagetransitionevent</code>"<td>{{PageTransitionEvent}}<td rowspan=2>[[!HTML]]
<tr><td>"<code>popstateevent</code>"<td>{{PopStateEvent}}
<tr><td>"<code>progressevent</code>"<td>{{ProgressEvent}}<td>[[!XHR]]
<tr><td>"<code>storageevent</code>"<td>{{StorageEvent}}<td>[[!HTML]]
<tr><td>"<code>svgevent</code>"<td>{{Event}}<td>
<tr><td>"<code>svgzoomevent</code>"<td rowspan=2>{{SVGZoomEvent}}<td rowspan=2>[[!SVG]]
<tr><td>"<code>svgzoomevents</code>"
<tr><td>"<code>textevent</code>"<td>{{CompositionEvent}}<td>[[!UIEVENTS]]
<tr><td>"<code>touchevent</code>"<td>{{TouchEvent}}<td>[[!TOUCH-EVENTS]]
<tr><td>"<code>trackevent</code>"<td>{{TrackEvent}}<td>[[!HTML]]
<tr><td>"<code>transitionevent</code>"<td>{{TransitionEvent}}<td>[[!CSS3-TRANSITIONS]]
<tr><td>"<code>uievent</code>"<td rowspan=2>{{UIEvent}}<td rowspan=2>[[!UIEVENTS]]
<tr><td>"<code>uievents</code>"
<tr><td>"<code>webglcontextevent</code>"<td>{{WebGLContextEvent}}<td>[[!WEBGL]]
<tr><td>"<code>wheelevent</code>"<td>{{WheelEvent}}<td>[[!UIEVENTS]]
</table>
<!-- XXX WebKit's architecture is broken here and both browsers support more than DOM.
https://trac.webkit.org/browser/trunk/Source/WebCore/dom/EventNames.in
https://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventDispatcher.cpp#819 -->

<li>If <var>constructor</var> is null, <a>throw</a> a
{{NotSupportedError}}.
Expand Down