Re: [heycam/webidl] Make [Exposed] mandatory, remove [PrimaryGlobal] (#423)

annevk commented on this pull request.

Pretty pretty good.

> @@ -4684,16 +4739,24 @@ An interface |A| is considered to be a
     For example, if author 1 writes:
 
     <pre highlight="webidl">
+        [Global,Exposed=Window]

This should be Global=Window, no?

>      is specified on the construct, then the [=exposure set=]
     is the set of all interfaces that have a [=global name=]
     that is listed in the extended attribute's argument.
-*   If the [{{Exposed}}]
-    [=extended attribute=]
-    does not appear on a construct, then its
-    [=exposure set=] is defined
-    implicitly, depending on the type of construct:
+
+    Note: this is always the case for [=namespaces=],
+    non-[=callback interface|callback=][=interfaces=],
+    and [=callback interfaces=] which declare [=constants=],
+    as they must be annotated with the [Exposed] extended attribute.

Cannot use a must in a note.

>          interface Window {
           // ...
         };
 
         // By using the same identifier Worker for both SharedWorkerGlobalScope
         // and DedicatedWorkerGlobalScope, both can be addressed in an [Exposed]
         // extended attribute at once.
-        [Global=Worker]
+        [Exposed=Window, Global=Worker]

This looks wrong.

>          interface SharedWorkerGlobalScope : WorkerGlobalScope {
           // ...
         };
 
-        [Global=Worker]
+        [Exposed=Window, Global=Worker]

This as well.

>          interface Window {
           // ...
         };
 
         // By using the same identifier Worker for both SharedWorkerGlobalScope
         // and DedicatedWorkerGlobalScope, both can be addressed in an [Exposed]
         // extended attribute at once.
-        [Global=Worker]
+        [Exposed=Window, Global=Worker]

You probably need the full `[Exposed=DedicatedWorker, Global=(Worker,DedicatedWorker)]` thing here.

>  can also be used to give a name to one or more global interfaces,
 which can then be referenced by the [{{Exposed}}]
 extended attribute.
 
-The [{{Global}}] and
-[{{PrimaryGlobal}}]
-extended attributes must either
-[=takes no arguments|take no arguments=]
-or [=takes an identifier list|take an identifier list=].
+The [{{Global}}] extended attribute must either
+[=takes no arguments|take no arguments=],

I don't think we need this variant really.

-- 
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/423#pullrequestreview-58089105

Received on Wednesday, 23 August 2017 14:07:38 UTC