- From: Ryosuke Niwa <notifications@github.com>
- Date: Tue, 01 Mar 2016 15:54:38 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/pull/405/r54657347@github.com>
> + > + <li>Let <var>extends</var> be the value of the <code>extends</code> member of <var>options</var>.</li> > + > + <li> > + <p>If <var>extends</var> is not null:</p> > + > + <ol> > + <li>If the <a href="https://dom.spec.whatwg.org/#context-object">context object</a> is an <a href="https://dom.spec.whatwg.org/#html-document">HTML document</a>, let <var>extends</var> be <a href="https://dom.spec.whatwg.org/#converted-to-ascii-lowercase">converted to ASCII lowercase</a>.</li> > + > + <li>If there is no <a href="https://dom.spec.whatwg.org/#concept-element-interface">element interface</a> for <var>extends</var> and the <a href="https://dom.spec.whatwg.org/#html-namespace">HTML namespace</a>, <a href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code>NotSupportedError</code> and abort these steps.</li> > + > + <li>Set <var>localName</var> to <var>extends</var>.</li> > + </ol> > + </li> > + > + <li>Let <var>prototype</var> be <a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a>(<var>constructor</var>, "prototype"). Rethrow any exceptions.</li> I also think it's valuable to check that the [[Prototype]] internal slot of `constructor` is HTMLElement (or inherits from HTMLElement when `extends` is specified) as an early error although the author can modify __proto__ after the fact so it might be sufficient to check when the element gets constructed. Anyway, this change can probably be made separately. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/pull/405/files#r54657347
Received on Tuesday, 1 March 2016 23:55:27 UTC