Re: [heycam/webidl] Add [LegacyWindowAlias] extended attribute for WebKitCSSMatrix et al (#364)

tobie commented on this pull request.

Once these latests issues are addressed, this LGTM. Would want to hear back from @bzbarsky and FF strategy before merging, however. 

> @@ -8725,6 +8727,71 @@ for the specific requirements that the use of
 entails.
 
 
+<h4 id="LegacyWindowAlias" extended-attribute lt="LegacyWindowAlias">[LegacyWindowAlias]</h4>

I think you also need to add a number of restrictions around the identifiers and also amend the NamedConstructor description accordingly:

1. [LegacyWindowAlias] identifiers can't be the same as that of an interface that has an interface object.
1. [LegacyWindowAlias] identifiers can't be the same as that of a [NamedConstructor].
1. [LegacyWindowAlias] identifiers can't be the same as that of a [LegacyWindowAlias] used on another interface.
1.  [LegacyWindowAlias] identifiers must not be one of the reserved identifiers.



> @@ -8725,6 +8727,71 @@ for the specific requirements that the use of
 entails.
 
 
+<h4 id="LegacyWindowAlias" extended-attribute lt="LegacyWindowAlias">[LegacyWindowAlias]</h4>
+
+If the [{{LegacyWindowAlias}}] [=extended attribute=] appears on an [=interface=],
+it indicates that the [=primary global interface=] will have a property
+for each identifier mentioned in the extended attribute,

Eventually, link identifier.

> @@ -10119,6 +10186,15 @@ and its value is an object called the <dfn id="dfn-interface-object" export>inte
 The property has the attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
 The characteristics of an interface object are described in [[#interface-object]].
 
+If the [{{LegacyWindowAlias}}] extended attribute was specified on an interface,
+then for each [=identifier=] mentioned in the extended attribute,
+there must be a corresponding property on the [=primary global interface=],
+known as the <dfn id="dfn-legacy-window-alias" export>legacy window alias</dfn>.

I know I wrote that, but this reads poorly: "known as the <dfn id="dfn-legacy-window-alias" export>legacy window alias</dfn>". It's not super clear whether we're naming the property or the object it references, which already has another name. Maybe not a useful concept to export?

> @@ -10119,6 +10186,15 @@ and its value is an object called the <dfn id="dfn-interface-object" export>inte
 The property has the attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
 The characteristics of an interface object are described in [[#interface-object]].
 
+If the [{{LegacyWindowAlias}}] extended attribute was specified on an interface,
+then for each [=identifier=] mentioned in the extended attribute,
+there must be a corresponding property on the [=primary global interface=],
+known as the <dfn id="dfn-legacy-window-alias" export>legacy window alias</dfn>.
+The name of the property is the [=legacy window alias=]'s [=identifier=],

What we did for NamedConstructor is define a "NamedConstructor identifier" in the [NamedConstructor] section above. Maybe you'd want something similar here, especially if we get rid of defining the [=legacy window alias=]?


> @@ -10119,6 +10186,15 @@ and its value is an object called the <dfn id="dfn-interface-object" export>inte
 The property has the attributes { \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
 The characteristics of an interface object are described in [[#interface-object]].
 
+If the [{{LegacyWindowAlias}}] extended attribute was specified on an interface,

Right now this doesn't specify clearly whether the LegacyWindowAlias should be exposed if its related interface isn't (e.g. because of SecureContext). NamedConstructor is more explicit here: "for every [{{NamedConstructor}}] extended attribute on an [=exposed=] interface, […]". Maybe copy that text?

-- 
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/364#pullrequestreview-38655201

Received on Wednesday, 17 May 2017 13:14:58 UTC