Skip to content
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

Maybe throw NotSupportedError for createEvent('touchevent') #1071

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 6 additions & 8 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ urlPrefix: https://w3c.github.io/hr-time/#; spec: HR-TIME
type:dfn; text: time origin; url: dfn-time-origin
type:dfn; text: current high resolution time; url: dfn-current-high-resolution-time
type:dfn; text: relative high resolution coarse time; url: dfn-relative-high-resolution-coarse-time
urlPrefix: https://w3c.github.io/touch-events/#; spec: TOUCH-EVENTS
type:dfn; urlPrefix: dfn-; text: expose legacy touch event APIs
</pre>

<pre class=link-defaults>
Expand Down Expand Up @@ -5390,6 +5392,10 @@ are:
<ol>
<li><p>Let <var>constructor</var> be null.

<li><p>If <var>interface</var> is an <a>ASCII case-insensitive</a> match for
"<code>touchevent</code>" and the user agent's <a>expose legacy touch event APIs</a> is false, then
<a>throw</a> a "{{NotSupportedError!!exception}}" {{DOMException}}. [[!TOUCH-EVENTS]]

<li>
<p>If <var>interface</var> is an <a>ASCII case-insensitive</a> match for any of the strings in the
first column in the following table, then set <var>constructor</var> to the interface in the
Expand Down Expand Up @@ -5427,14 +5433,6 @@ are:
<li><p>If <var>constructor</var> is null, then <a>throw</a> a "{{NotSupportedError!!exception}}"
{{DOMException}}.

<li>
<p>If the interface indicated by <var>constructor</var> is not exposed on the
<a>relevant global object</a> of <a>this</a>, then <a>throw</a> a
"{{NotSupportedError!!exception}}" {{DOMException}}.

<p class=note>Typically user agents disable support for touch events in some configurations, in
which case this clause would be triggered for the interface {{TouchEvent}}.

<li><p>Let <var>event</var> be the result of <a>creating an event</a> given <var>constructor</var>.

<li><p>Initialize <var>event</var>'s {{Event/type}} attribute to the empty string.
Expand Down