-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Labels
⌛⌛⌛ duration:longThere goes your week-endThere goes your week-end☕☕ difficulty:mediumHard to fixHard to fix
Description
Many new APIs (and some new arguments to existing APIs) are relying on dictionaries. But doing feature detection of such members requires ugly and complex code like:
var supportsCaptureOption = false;
try {
addEventListener("test", null, Object.defineProperty({}, 'capture', {get: function () {
supportsCaptureOption = true;
}}));
} catch(e) {}
This increases the concern that new APIs will lead to sites being broken on older browsers because developers didn't understand or couldn't be bothered with the difficult feature detection.
In WICG/EventListenerOptions#31 @tabatkins proposed a mechanism whereby all dictionary types would automatically get a JS-exposed object with a property-per-member to enable consistent and easy feature detection.
Thoughts?
gsnedders, romanosdjk, samuelgoto, oberbeck and saschanaz
Metadata
Metadata
Assignees
Labels
⌛⌛⌛ duration:longThere goes your week-endThere goes your week-end☕☕ difficulty:mediumHard to fixHard to fix