Loading ...
Sorry, an error occurred while loading the content.

Re: [svg-developers] How to tell when an element has loaded into an html5 document?

Expand Messages
  • Cameron Laird
    On Sun, Nov 15, 2009 at 10:53:51AM -0500, Bryan Berry wrote: . . . ... . . . Absolutely; it s just the onload() you d expect. Let s be more concrete about
    Message 1 of 2 , Nov 15, 2009
    • 0 Attachment
      On Sun, Nov 15, 2009 at 10:53:51AM -0500, Bryan Berry wrote:
      .
      .
      .
      > svg buddies, does an svg element emit any kind of event when embedded in
      > an html page so that I can tell it is loaded?
      .
      .
      .
      Absolutely; it's just the onload() you'd expect.

      Let's be more concrete about this, as even your simple desription
      leaves quite a few variabls unbound. A construct like

      <object id = "my_image" type = "image/svg+xml"
      data = "my_image.svg"
      onload = "do_important_thing();" ...>

      does just what I need in such situations. Notice you can get much
      of the same effect by working with event properties, named scripts,
      ...

      Do you want the event-handler to be *within* the SVG? That's also
      possible, but a different thing. If this, or some other variation,
      is what you're truly after, don't hesitate to follow-up here.
    Your message has been successfully submitted and would be delivered to recipients shortly.