Skip to content

Commit

Permalink
More fixes to element interface, and extends domintro
Browse files Browse the repository at this point in the history
We should include in the eventual commit message:

In the process of upstreaming, changes were made to the "element interface" section to nail down underspecified edge cases, and fix https://www.w3.org/Bugs/Public/show_bug.cgi?id=27877.
  • Loading branch information
domenic committed Apr 8, 2016
1 parent 794c558 commit d645d1d
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -9574,26 +9574,28 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre>
<span>HTML namespace</span> is determined as follows:</p>

<ol>
<li><p>If <var>name</var> is <code>blink</code>, <code>bgsound</code>, <code>isindex</code>,
<li><p>If <var>name</var> is <code>bgsound</code>, <code>blink</code>, <code>isindex</code>,
<code>multicol</code>, <code>nextid</code>, or <code>spacer</code>, return
<code>HTMLUnknownElement</code>.</p></li>
<!-- These have to be explicitly listed because technically we define these elements in HTML,
albeit as obsolete. -->

<li><p>If this specification defines an interface appropriate for the element type corresponding
to the local name <var>name</var>, return that interface.</p></li>
<li><p>If <var>name</var> is <code>acronym</code>, <code>basefont</code>, <code>big</code>,
<code>center</code>, <code>listing</code>, <code>nobr</code>, <code>noembed</code>,
<code>noframes</code>, <code>plaintext</code>, <code>rb</code>, <code>rtc</code>,
<code>strike</code>, <code>tt</code>, or <code>xmp</code>, return
<code>HTMLElement</code>.</p></li>

<li><p>If this specifications defines the element type corresponding to the local name
<var>name</var>, but not an interface, return <code>HTMLElement</code>.</p></li>
<!-- Otherwise, e.g., <listing> would not be covered. -->
<li><p>Otherwise, if this specification defines an interface appropriate for the <span>element
type</span> corresponding to the local name <var>name</var>, return that interface.</p></li>

<li><p>If <span>other applicable specifications</span> define such an appropriate interface for
<li><p>If <span>other applicable specifications</span> define an appropriate interface for
<var>name</var>, return the interface they define.</p></li>

<li><p>If <var>name</var> is a <span>valid custom element name</span>, return
<code>HTMLElement</code>.</p>

<li><p>Otherwise, return <code>HTMLUnknownElement</code>.</p></li>
<li><p>Return <code>HTMLUnknownElement</code>.</p></li>
</ol>

<p class="note">The use of <code>HTMLElement</code> instead of <code>HTMLUnknownElement</code> in
Expand Down Expand Up @@ -66874,12 +66876,12 @@ dictionary <dfn>ElementRegistrationOptions</dfn> {

<dt><var>window</var> . <code data-x="dom-window-customElements">customElements</code> . <code
data-x="dom-CustomElementsRegistry-define">define</code>(<var>name</var>, <var>constructor</var>,
{ extends: <var>base</var> })</dt>
{ extends: <var>baseLocalName</var> })</dt>

<dd>Defines a new <span>custom element</span>, mapping the given name to the given constructor as
a <span>type extension</span> for the supplied <var>base</var> element. A
<code>NotSupportedError</code> will be thrown upon trying to extend a <span>custom element</span>
or an unknown element.</dd>
a <span>type extension</span> for the <span>element type</span> identified by the supplied
<var>baseLocalName</var>. A <code>NotSupportedError</code> will be thrown upon trying to extend a
<span>custom element</span> or an unknown element.</dd>
</dl>

<p><dfn>Element definition</dfn> is a process of adding a <span>custom element definition</span>
Expand Down

0 comments on commit d645d1d

Please sign in to comment.