- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 01 Mar 2016 16:17:52 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/pull/405/r54659819@github.com>
> + > + <li>Let <var>result</var> be a new <a href="https://dom.spec.whatwg.org/#concept-element">element</a> that implements <var>interface</var>, with no attributes, <a href="https://dom.spec.whatwg.org/#concept-element-namespace">namespace</a> set to the <a href="https://dom.spec.whatwg.org/#html-namespace">HTML namespace</a>, <a href="https://dom.spec.whatwg.org/#concept-element-local-name">local name</a> set to <var>localName</var>, and <a href="https://dom.spec.whatwg.org/#concept-node-document">node document</a> set to the <a href="https://dom.spec.whatwg.org/#context-object">context object</a>.</li> > + > + <li><a href="https://dom.spec.whatwg.org/#concept-element-attributes-set-value">Set the attribute value</a> for <var>result</var> using <code>is</code> and <var>type</var>.</li> > + </ol> > + </li> > + > + <li> > + <p>Otherwise, if <var>registry</var> contains an entry with <a href="#dfn-element-definition-local-name">local name</a> <var>localName</var>:</p> > + > + <ol> > + <li>Let <var>definition</var> be the entry in <var>registry</var> with <a href="#dfn-element-definition-local-name">local name</a> <var>localName</var>.</li> > + > + <li>Let <var>C</var> be <var>definition</var>'s <a href="#dfn-element-definition-constructor">constructor</a>.</li> > + > + <li>Return the result of <a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a>(<var>C</var>), rethrowing any exceptions.</li> When speccing this I ended up just doing Construct(C) in createElement. I vaguely recall @annevk wanting to use the upgrading path for this, since it's a DOM method and so it should use the same nanotask infrastructure? @rniwa points out the difference is observable in edge cases where you construct yourself inside your constructor before calling super(). --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/pull/405/files#r54659819
Received on Wednesday, 2 March 2016 00:18:23 UTC