Closed Bug 1254159 Opened 9 years ago Closed 9 years ago

The onload event is not fired with the symbols are loaded in a svg

Categories

(Core :: DOM: Events, defect)

44 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: tres.14159, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.116 Chrome/48.0.2564.116 Safari/537.36 Steps to reproduce: I am working in the PHP project that paints a svg with some symbols and there is some javascript code to make this svg. And the code runs fine in Chromium. But the firefox does not throw the event onload in the simbols. I have a tiny example: <html> <head> <title>test onload event in a svg symbol</title> <script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" pointer-events="all" width="500px" height="500px" style="background: #ffff00;"> <g class="cat" transform="translate(100 100)"> <use xlink:href="animals.svg#cat" onload="javascript: console.log('This message is not showed in firefox.');" /> </g> </svg> <script type="text/javascript"> d3.select("svg") .append("g") .attr("class", "dog") .attr("transform", "translate(200 200) scale(0.5)") .append("use") .attr("xlink:href", "animals.svg#dog") .on("load", function() { console.log("And this message is not showed in firefox too."); }); </script> </body> </html> Actual results: Nothing. Expected results: Execute the code of event load.
Attached image animals.svg
Component: Untriaged → DOM: Events
Product: Firefox → Core
For performance reasons only <svg> and <image> elements get load events dispatched to them.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Well, the standard documentation (w3c) says there is "onload" event, then Firefox does not comply the SVG standard...because the performance is important....it is sounds good. https://www.w3.org/TR/SVG/struct.html#UseElement
I know what the standard says, that's why I set this bug to WONTFIX rather than INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: