Closed Bug 225244 Opened 21 years ago Closed 19 years ago

onload attribute not allowed in HTML tags other then BODY and FRAMESET

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: supermario, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

Mozilla execute script code of the onload() event in tags like IMG and OBJECT.
But in the (X)HTML specs, the onload attribute is only allowed for the BODY and
FRAMESET element and should ignored in other tags.

Reproducible: Always

Steps to Reproduce:



Expected Results:  
Mozilla should only execute script code in the onload attribute, if it part of a
BODY and FRAMESET element.
no need to keep this security-sensitive...
Group: security
Use of the onload attribute on images and scripts (and <object>) may not be in
the spec, but it's a de-facto standard.  Every single major browser supports it,
and it's widely used.

Since supporting it also doesn't violate any specs, I see no reason to restrict
support to quirks mode (in other words, I believe this is wontfix).
And marking so.  Ian, WHATWG may want to standardize this if it doesn't already.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
Will do. Thanks for the headsup.
In HTML5, all the event handler attributes apply to all HTML elements.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.