-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [LegacyWindowAlias] extended attribute for WebKitCSSMatrix et al #364
Conversation
First of all, thanks for doing the work! A couple of high-level nits:
Seems it would be useful to include this in §3.6 Interfaces too, no? |
Thanks! Will fix. Some more todos:
|
OK, please take another look. |
index.bs
Outdated
@@ -10202,6 +10269,21 @@ the <code>typeof</code> operator will return "function" when applied to an inter | |||
</div> | |||
|
|||
|
|||
<h4 id="legacy-window-alias">Legacy window alias</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move that whole section up in to the introductory section of §3.6 either as second or third ¶ and turn it into something like this:
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=],
and its value is a reference to the [=interface object=] for the [=interface=].
The property has attributes
{ \[[Writable]]: <emu-val>true</emu-val>, \[[Enumerable]]: <emu-val>false</emu-val>, \[[Configurable]]: <emu-val>true</emu-val> }.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Only changed "The property has attributes" to "The property has the attributes" for consistency with the surrounding paragraphs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you also need to add a number of restrictions around the identifiers and also amend the NamedConstructor description accordingly:
- [LegacyWindowAlias] identifiers can't be the same as that of an interface that has an interface object.
- [LegacyWindowAlias] identifiers can't be the same as that of a [NamedConstructor].
- [LegacyWindowAlias] identifiers can't be the same as that of a [LegacyWindowAlias] used on another interface.
- [LegacyWindowAlias] identifiers must not be one of the reserved identifiers.
index.bs
Outdated
|
||
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually, link identifier.
index.bs
Outdated
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>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I wrote that, but this reads poorly: "known as the legacy window alias". 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?
index.bs
Outdated
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=], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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=]?
index.bs
Outdated
@@ -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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't copy it directly (since here it's a just single extended attribute), but certainly makes sense to add [=exposed=].
OK addressed latest round of feedback. |
* Turn "LegacyWindowAlias identifiers" dfn from a list to an identifier. * Fix a forgotten "must not". * Reference identifiers according to their extended attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sounds like @zcorpan's fine with the changes. Merging. |
Fixes #362.
Preview | Diff