- From: Ryosuke Niwa <notifications@github.com>
- Date: Tue, 01 Mar 2016 16:27:07 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Message-ID: <w3c/webcomponents/pull/405/r54660827@github.com>
> - <li>Return <var>ELEMENT</var>.</li> > - </ol></li> > - <li>Call <code><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a>(</code><var>FUNCTION</var><code>, @@create, PropertyDescriptor{[[\Value]]: </code><var>CREATE</var><code>, [[\Writable]]: false, [[\Enumerable]]: false, [[\Configurable]]: false})</code></li> > - <li>Return <var>FUNCTION</var>.</li> > + <li>Let <var>C</var> be <var>definition</var>'s <a href="#dfn-element-definition-constructor">constructor</a>.</li> > + > + <li>Let <var>constructResult</var> be <a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a>(<var>C</var>).</li> > + > + <li>Remove <var>element</var> from the end of <var>definition</var>'s <a href="#dfn-element-definition-construction-stack">construction stack</a>.</li> > + > + <li>If <var>constructResult</var> is an abrupt completion, return <var>constructResult</var> (i.e., re-throw the exception).</li> > + > + <li> > + <p>If <a href="https://tc39.github.io/ecma262/#sec-samevalue">SameValue</a>(<var>constructResult</var>.[[\value]], <var>element</var>) is false, <a href="https://heycam.github.io/webidl/#dfn-throw">throw</a> a <code>InvalidStateError</code> and terminate these steps.</p> > + > + <p class="note">This can occur if <var>C</var> constructs another instance of the same custom element before calling <code>super()</code>.</p> Or the constructor returns a random object e.g. {}. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/pull/405/files#r54660827
Received on Wednesday, 2 March 2016 00:28:04 UTC