Re: [heycam/webidl] Update attribute setter/getters in various ways (#217)

domenic commented on this pull request.



> +                    then:
+                    1.  If |attribute| was specified with the [{{LenientThis}}]
+                        [=extended attribute=], then return <emu-val>undefined</emu-val>.
+                    1. Otherwise, <a lt="es throw">throw a <emu-val>TypeError</emu-val></a>.
+            1.  Let |R| be the result of performing the actions listed in the
+                description of |attribute| that occur on getting (or those listed in the description
+                of the inherited attribute, if this attribute is declared to
+                [=inherit its getter=]), on |O| if |O| is not <emu-val>null</emu-val>.
+            1.  Return the result of [=converted to an ECMAScript value|converting=] |R| to an
+                ECMAScript value of the type |attribute| is declared as.
+
+        And then, if an exception was thrown:
+
+        1.  If |attribute|'s type is a [=promise type=], then:
+            1.  Let |reject| be the initial value of [=%Promise%=].reject.
+            1.  Return the result of calling |reject| with [=%Promise%=] as the

> It's worth taking a step back for a second and asking what the point of [SameObject] really is and why we have it at all, then trying to figure out what it means to map that concept to promise-returning getters. Assuming that's really possible.

Right. I perhaps am not the best person for this, since I don't like these documentation-only extended attributes. But I tried to put myself in the shoes of someone who does, and an interpretation of "returns the same object in non-exceptional cases" seemed like a good thing to document.

> Thank you. And Edge?

I haven't seen any preferences from them.

-- 
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/217

Received on Wednesday, 9 November 2016 20:56:25 UTC