-
Notifications
You must be signed in to change notification settings - Fork 289
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
Proposal: A new way to do feature detection for members #1181
Comments
Why would we not continue the discussion in whatwg/webidl#107? |
Do you mean to say that you'd like to conclude the discussion on whatwg/webidl#107 first? Or move the issues to that repo? Or that you would like François and I to both copy/paste our proposals into that specific thread as-is and continue there? |
Primarily the first. And I recommend not focusing on specific solutions for now. |
Web APIs are relying more and more on dictionaries. And doing feature detection of such members requires ugly and unnecessary complicated code. Following WICG/EventListenerOptions#31, #491, and many more over the years, I'm proposing WebIDL allows us to expose interfaces under a specific "namespace/scope" to avoid polluting the global scope.
Current state for an API called
MyAPI
window.MyDictionaryOptions
now unnecessarily exists.Proposal
Use interfaces instead of dictionaries when possible and expose them under a specific member of the API.
What do you folks think about this?
The text was updated successfully, but these errors were encountered: