Re: [heycam/webidl] Modernize invoking user code (#113)

>            <ol class="algorithm">
>              <li>Try running the following steps:
>                <ol>
> -                <li>Let <var>V</var> be the IDL <a class="dfnref" href="#idl-interface">callback interface type</a> value
> -                  that represents the <a class="dfnref" href="#dfn-user-object">user object</a> implementing the <a class="dfnref" href="#dfn-interface">interface</a>.</li>
> -                <li>Let <var>O</var> be the ECMAScript object corresponding to <var>V</var>.</li>
> -                <li>Let <var>X</var> be the implementation of the operation.  If the interface is a <a class="dfnref" href="#dfn-single-operation-callback-interface">single operation callback interface</a> and <a class="external" href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a>(<var>O</var>) is true, then <var>X</var> is <var>O</var>.
> -                  Otherwise, <var>X</var> is the result of calling
> -                  the internal <span class="prop">[[Get]]</span> method of <var>O</var> with the identifier of the operation as the property name.</li>
> -                <li>If <a class="external" href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a>(<var>X</var>) is not Object, <a href="#ecmascript-throw" class="dfnref external">throw a <span class="estype">TypeError</span></a> exception.</li>
> +                <li>If <var>thisArg</var> was not given, let <var>thisArg</var> be <span class="es-value">undefined</span>.</li>
> +                <li>Let <var>O</var> be the ECMAScript object corresponding to <var>value</var>.</li>
> +                <li>Determine the implementation of the operation, <var>X</var>:
> +                  <ol>
> +                    <li>If <var>value</var>'s interface is a <a class="dfnref" href="#dfn-single-operation-callback-interface">single operation callback interface</a> and <a class="external" href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a>(<var>O</var>) is true, then set <var>X</var> to <var>O</var>.</li>
> +                    <li>Otherwise, <var>opName</var> must be supplied. Set <var>X</var> to <a class="external" href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a>(<var>O</var>, <var>opName</var>).</li>

The handling of abrupt completions here is dodgy, but it was before your changes too, I guess...  We should really fix that up at some point.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/113/files/2687a7f8dee42781c250ffc11c084f1ef84d1bf4#r62922791

Received on Wednesday, 11 May 2016 20:42:51 UTC