SVG symbols do not fire onload event (only in firefox). I lo

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Posts: 1
Joined: March 8th, 2016, 1:29 am

Post Posted March 8th, 2016, 1:36 am

I am working with D3.js in a project to make a diagram with SVG. The diagram uses SVG symbols. And I have javascript code to manage these items with onload events.

In browsers such as webkit engine browsers runs very fine. But Firefox...Firefox does not run any onload event into a SVG.

Well, I saw the bug and thought Firefox is free software and these people loves the bugtracking. And I have uploaded the bug

And the response from these people is a "WONTFIX".

The example for to check the bug is tiny and clear:

Code: Select all
        <title>test onload event in a svg symbol</title>
        <script src="//" charset="utf-8"></script>
        <svg xmlns="" xmlns: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.');" />
        <script type="text/javascript">
                    .attr("class", "dog")
                    .attr("transform", "translate(200 200) scale(0.5)")
                        .attr("xlink:href", "animals.svg#dog")
                        .on("load", function() {
                            console.log("And this message is not showed in firefox too.");

Finally, I look for in the w3c documents and the event onload in symbols are standard:

Has anybody a workaround for this?

If somebody want karma points, I have opened a question in stackoverflow: ... workaround


User avatar
Posts: 118975
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted March 8th, 2016, 5:55 am

Moving to Web Development.

Return to Web Development / Standards Evangelism

Who is online

Users browsing this forum: No registered users and 1 guest