This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11358 - Should addEventListener's last argument be optional?
Summary: Should addEventListener's last argument be optional?
Status: VERIFIED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords: reviewerSatisfied
Depends on:
Blocks:
 
Reported: 2010-11-20 10:16 UTC by Ms2ger
Modified: 2012-03-09 17:43 UTC (History)
4 users (show)

See Also:


Attachments

Description Ms2ger 2010-11-20 10:16:02 UTC
Apparently WebKit allows leaving off the last argument. See
<https://bugzilla.mozilla.org/show_bug.cgi?id=613634>.
Comment 1 Adam Barth 2010-11-21 17:57:18 UTC
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.
Comment 2 Travis Leithead [MSFT] 2012-03-08 21:16:53 UTC
Assigning to myself to take action on these open bugs.
Comment 3 Adam Barth 2012-03-08 23:05:59 UTC
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.
Comment 4 Travis Leithead [MSFT] 2012-03-08 23:54:38 UTC
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.
Comment 5 Ms2ger 2012-03-09 10:27:05 UTC
Thank you; I am satisfied with the current specification.