Re: [heycam/webidl] Make interface prototype object creation imperative (#494)

bzbarsky commented on this pull request.



> +        and |interface| [=support named properties|supports named properties=],
+        then set |proto| to the [=named properties object=] in |realm| of |interface|.
+    1.  Otherwise, if |interface| is declared to inherit from another interface,
+        then set |proto| to the [=interface prototype object=] in |realm|
+        of that [=inherited interface=].
+    1.  Otherwise, if |interface| is the {{DOMException}} [=interface=],
+        then set |proto| to |realm|.\[[Intrinsics]].[[{{%ErrorPrototype%}}]].
+    1.  Otherwise, if |interface| is declared with the [{{LegacyArrayClass}}] [=extended attribute=],
+        then set |proto| to |realm|.\[[Intrinsics]].[[{{%ArrayPrototype%}}]].
+    1.  Otherwise, set |proto| to |realm|.\[[Intrinsics]].[[{{%ObjectPrototype%}}]].
+    1.  Assert: <a abstract-op>Type</a>(|proto|) is Object.
+    1.  Let |interfaceProtoObj| be [=!=] <a abstract-op>ObjectCreate</a>(|proto|).
+    1.  If |interface| has any [=member=] declared with the [{{Unscopable}}] [=extended attribute=],
+        then:
+        1.  Let |unscopableObject| be the result of performing [=!=]
+            <a abstract-op>ObjectCreate</a>(<emu-val>null</emu-val>).

The null unscopable thing is https://github.com/heycam/webidl/issues/496

Safari already has the right behavior.  

I filed https://bugs.chromium.org/p/chromium/issues/detail?id=811029 (though of course bugs.chromium.org picked up the wrong account _again_, so if that can be changed or the issue deleted I would appreciate that) and https://bugzilla.mozilla.org/show_bug.cgi?id=1437255 which has idlharness tests for this stuff.

I can't file bugs on Edge, unfortunately, so someone else will have to do that.

-- 
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/494#discussion_r167390513

Received on Saturday, 10 February 2018 05:53:58 UTC