Re: [heycam/webidl] Introduce a SameRealmBrandCheck extended attribute (#718)

littledan commented on this pull request.



> @@ -12284,9 +12310,15 @@ The value of the [=function object=]’s <code class="idl">name</code> property
 </div>
 
 <div algorithm>
-    An ECMAScript value |value| <dfn export>implements</dfn> an [=interface=] |interface|
-    if |value| [=is a platform object=] and the [=inclusive inherited interfaces=] of
-    |value|.\[[PrimaryInterface]] [=list/contains=] |interface|.
+    An ECMAScript value |value| <dfn export>implements</dfn> an [=interface=] |interface| if the
+    following steps return true:
+
+    1.  If |value| [=is a platform object|is not a platform object=], return false.
+    1.  If the [=inclusive inherited interfaces=] of |value|.\[[PrimaryInterface]] does not
+        [=list/contain=] |interface|, return false.
+    1.  If |interface| has a [{{SameRealmBrandCheck}}] [=extended attribute=] and
+        |value|.\[[Realm]] is not the [=current Realm=], return false.

I'm having trouble telling one way or another. Seems like everything that currently refers to "implements" is fine. I tried searching the HTML spec for uses of phrases that we might convert to "implements" calls, such as "is a", but many of these seem to be other concepts (e.g., "is a URL" and "is an HTML document"). Given this, I'm fine with landing this change and adding a brand-independent check later if we find a need for it.

-- 
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/718#discussion_r287645195

Received on Monday, 27 May 2019 04:47:49 UTC