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

domenic commented on this pull request.



> +<div algorithm>
+
+    The <dfn id="dfn-attribute-setter" export>attribute setter</dfn> is created as follows, given an
+    [=attribute=] |attribute|, an [=interface=] |target|, and a [=Realm=] |realm|:
+
+    1.  If |attribute| is [=read only=] and does not have a
+        [{{LenientThis}}], [{{PutForwards}}] or [{{Replaceable}}] [=extended attribute=], return
+        <emu-val>undefined</emu-val>; there is no [=attribute setter=] function.
+    1.  Assert: |attribute|'s type is not a [=promise type=].
+    1.  Let |steps| be the following series of steps:
+        1.  If no arguments were passed, then
+        1.  Let |V| be the value of the first argument passed.
+        1.  Let |id| be |attribute|'s [=identifier=].
+        1.  Let |O| be <emu-val>null</emu-val>.
+        1.  If |attribute| is not a [=static attribute=]:
+            1.  If the <emu-val>this</emu-val> value is <emu-val>null</emu-val> or

Hmm. I don't really find that clearer; I like how you just check the conditions one after another in the existing version. Let's leave it for a follow-up, as we'd also want to change the analogous steps for operations.

-- 
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 Thursday, 19 January 2017 21:46:40 UTC