New issue
Advanced search Search tips

Issue 612654 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

DOM Event listener attributes should replace attribute listeners

Project Member Reported by esprehn@chromium.org, May 18 2016

Issue description

See thread here:
https://lists.webkit.org/pipermail/webkit-dev/2016-May/028224.html

A web page that I'm testing with webkit, uses two event listeners about load event.
It registered those by assigning to window.onload and setting as an 'onload' attribute of body element.
 
On webkit, last registered one replaces previous one, in this case 'onload' attribute wins.
I checked other browsers, but only chrome permits two listeners on same event type.
 
I googled and found out that it's DOM Level 0 event handling.
And I'm wondering this is a webkit bug when using a mix of traditional model and inline model (as referred to below), or implementor dependent.
 
https://en.wikipedia.org/wiki/DOM_events#DOM_Level_0 
 
<html> 
<head> 
<title>onloadload</title> 
<script type="text/javascript"> 
function load() {
    alert("body.onload");
}
window.onload = function () { // traditional model
    alert("window.onload");
};
</script> 
</head> 
<body onload="load()"> <!-- inline model -->
<p>onload.</p> 
</body> 
</html> 

Which apple replies with:
"""
Given that both Mozilla Firefox and Microsoft Edge both agree with WebKit, it is unlikely we would accept a change to this behavior.
"""

 

Comment 1 Deleted

Comment 2 by tkent@chromium.org, May 20 2016

Status: Available (was: ava)

Comment 3 by phistuck@gmail.com, May 20 2016

This sounds weird - everyone (including WebKit) but Chrome replaces the event listener?
If so, this sounds like a regression, since it sounds like WebCore code which Chrome always shared with Safari. Or is this a bindings-related issue that always existed?
Project Member

Comment 4 by sheriffbot@chromium.org, May 22 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by tkent@chromium.org, May 26 2017

Status: WontFix (was: Untriaged)
Looks this was fixed. Chrome 60, Safari, and Firefox has the same behavior.


Sign in to add a comment