Load event not fired on Safari when reloading page
<p>I have a simple SVG loaded inside a <code>object</code> tag like the code below. On Safari, the <code>load</code> event is fired just once, when I load the first time the page after opening the browser. All the other times it doesn't. I'm using the <code>load</code> event to initialize some animations with GSAP, so I need to know when the SVG is fully loaded before being able to select the DOM nodes. A quick workaround that seems to work is by using <code>setTimeout</code> instead of attaching to the event, but it seems a bit akward as slower networks could not have load the <code>object</code> in the specified amount of time. I know this event is not really standardized, but I don't think I'm the first person that faced this problem. How would you solve it?</p>

<pre><code>var myElement = document.getElementById('my-element').getElementsByTagName('object')[0];

myElement.addEventListener('load', function () {
    var svgDocument = this.contentDocument;
    var myNode = svgDocument.getElementById('my-node');

    ...
}
</code></pre>