Re: [heycam/webidl] Why do we have super-permissive ExtendedAttribute grammar? (#574)

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 `:` so not an identifier) and https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Pref which expects a string containing `.` as the  value and so forth.

Blink looks like it has a `ReflectOnly` extended attribute which takes a list of strings as a value.  Typical usage looks like `ReflectOnly=("","no-referrer","origin","no-referrer-when-downgrade","origin-when-cross-origin","unsafe-url")`.  They also have things like `ReflectMissing=""` and `ReflectInvalid=""` which don't fit into the  five IDL spec buckets.

WebKit has things like `CallWith=ScriptState&ScriptExecutionContext` in their IDL.

-- 
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/issues/574#issuecomment-406637918

Received on Friday, 20 July 2018 15:36:09 UTC