Re: [heycam/webidl] Need pattern for feature detecting dictionary members (#107)

This idea of a `createDictionary(name, dict)` method sounds like a variation of the solution proposed in the OP and faces the same issues expressed in https://github.com/heycam/webidl/issues/107#issuecomment-207624085.

The most convincing argument against this model for me is that specs authors should be able to change these dictionaries in ways that would break this model.  
As an example, the very `EventListenerOptions` dictionary this issue originally came from [has been changed](https://github.com/whatwg/dom/commit/e002d7811533e276c9927b237748c4e170f4cb10) just seven days after this issue got open to be split in two dictionaries, and [a few days later](https://github.com/whatwg/dom/commit/a13a3c7fc14732691b50c51316b16de0915a61f2) it went from holding two properties to just one. An author today would have to test for `AddEventListenerOptions`, but a website written in the intermediary time-span would get false negatives by still looking for `EventListenerOptions`.

-- 
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/107#issuecomment-917854587

Received on Monday, 13 September 2021 05:30:42 UTC