-
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
Why do we have super-permissive ExtendedAttribute grammar? #574
Comments
I don't know why the grammar was designed that way, tbh. Is that causing an issue for implementors? |
The Browser Extensions spec tried to add [CheckAnyPermissions="browserExt"]
interface BrowserExtGlobal {
readonly attribute Browser browser;
}; This is causing a weird situation where webidl2.js somehow thinks it's legal and parses it, and then ReSpec throws because it doesn't know about that style. |
The grammar is permissive so people can add extended attributes with more complicated values as needed; the Web IDL spec is not the only thing that defines extended attributes. UAs definitely use extended attributes that don't fit into the five buckets defined in the Web IDL spec in their IDL for various purposes. For example, Gecko has https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Func which expects a fully qualified C++ function name as the value (can contain Blink looks like it has a WebKit has things like |
I see, it's to allow extensions with arbitrary syntax. Thank you for giving existing examples! |
Section 2.13 says that any real extended attributes are matched against the better-defined five
ExtendedAttribute*
grammars, but then why do we haveExtendedAttribute
?I mean, should
[()]
be allowed, as()
is a validExtendedAttribute
?The text was updated successfully, but these errors were encountered: