Closed Bug 654684 Opened 13 years ago Closed 13 years ago

SVG: the onload event is not called for nested elements

Categories

(Firefox :: General, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 571134

People

(Reporter: avodonosov, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

Example code:

<?xml version = '1.0' encoding = 'UTF-8' standalone = 'no'?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" onload="alert('onload for root')" width="1096" height="576" preserveAspectRatio="none" viewBox="0 0 1100 576">
  <g onload="alert('onload for g')" id="FILL" fill="GRAY" stroke="GRAY" stroke-width="1" opacity="1">
    <rect onload="alert('onload for rect')" x="0" y="0" width="24" height="10"/>
  </g>
</svg>

Here we specified 3 onload hanlders: for the root element SVG, and for two nested elements.

When we open this in FireFox 4.0.1 only one onload works - of the root element.
Other two does not work.

According to the SVG specification, all the onload's should work. In IE and FF 3.5 they work.

Reproducible: Always

Steps to Reproduce:
1. Save the SVN code provided in the description to a file.svg.
2. Open this file in FireFox 4.0.1


Actual Results:  
You see only one alert 'onload for root'.

Expected Results:  
You should see 3 alerts: 'onload for root', 'onload for g', 'onload for rect'
This functionality has been removed for performance reasons. I'm sorry but you'll just have to use onload on the svg element.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
This functionality cannot be duplicated merely by using the svg element.
The level of detail is there for a reason.
It adds functionality possibilities.
Is the performance rational still reasonable?
You need to log in before you can comment on or make changes to this bug.