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

> I would really rather we just disallowed using [SameObject] on Promise-valued attributes if we take this route, given the weird behavior.

I really don't think it's that weird. It's about the exception case. You don't require the same exception objects be thrown each time, so similarly, you shouldn't require the same promise object be returned each time.

> Do you have references for the other UAs, by any chance?

WebKit: https://github.com/heycam/webidl/issues/186

-- 
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 19:59:28 UTC