Closed Bug 1399232 Opened 8 years ago Closed 8 years ago

Console.webidl incorrectly uses const in a namespace

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jkratzer, Unassigned)

Details

Changeset f4c1500759bf changes the Console interface to a namespace while retaining the const IS_NATIVE_CONSOLE. https://hg.mozilla.org/mozilla-central/file/f4c1500759bf/dom/webidl/Console.webidl According to the spec, a const is not a valid identifier within a namespace. https://heycam.github.io/webidl/#idl-namespaces
Summary: Console.webidl incorrectly uses const in a namepsace → Console.webidl incorrectly uses const in a namespace
Yeah, this is a local extension we have to the spec's namespace syntax. It's hardly the only syntax extension we have in our webidl implementation. There's no actually good reason to prohibit constants in namespaces; the spec just didn't allow them because there were no existing use cases. If someone wanted constants in a namespace, the spec would add them at that point.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
And note that, for the same reason, attributes used to not exist on namespaces either, until someone needed them; see https://github.com/heycam/webidl/issues/263
You need to log in before you can comment on or make changes to this bug.