Bugzilla – Bug 11358
Should addEventListener's last argument be optional?
Last modified: 2012-03-09 17:43:44 UTC
Apparently WebKit allows leaving off the last argument. See
WebKit is a mess and randomly allows skipped arguments to some functions. I've asked around to see if we can straighten up the mess, and the general consensus was that we don't want to become more restrictive because that will break some amount of WebKit-specific content. On the other hand, we know of some cases where the strict behavior is required for compatibility (e.g., in XMLHttpRequest)!
In the case of addEventListener, I don't think WebKit will be able to make the last argument required. In the interests of converging behavior among browsers, we might want to make the last argument optional in all browsers.
Assigning to myself to take action on these open bugs.
We've made a lot of progress in WebKit cleaning up these bugs. We still thread the last argument to addEventListener as optional, but now we do that intentionally.
There's agreement between DOM4 and DOM3 Events regarding having the last argument as optional. Additionally, I think there's also implementation agreement on this as well.
I'm resolving this bug as Fixed accordingly. Please let me know if you disagree.
Thank you; I am satisfied with the current specification.