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

Re: Help with dynamic inline SVG

Expand Messages
  • Martin Honnen
    ... If you have e.g. in the HTML document then you can
    Message 1 of 7 , Jun 30, 2006
    • 0 Attachment
      --- In svg-developers@yahoogroups.com, "pothoven" <pothoven@...> wrote:

      > How can I access the data of the embedded
      > SVG to manipulate it?

      If you have e.g.
      <embed name="embedName"
      width="somewidth" height="someheight">
      in the HTML document then you can access the embed element as
      var embed = document.embeds.embedName;
      and then if the viewer/browser supports SVG and script access to the
      SVG then it exposes a method getSVGDocument e.g.
      if (typeof embed.getSVGDocument != 'undefined') {
      var svgDocument = embed.getSVGDocument();
      // now use the the SVG document to access nodes with
      // getElementById, getElementsByTagNameNS,
      // to create nodes with e.g. createElementNS

      IE/Win with the Adobe viewer exposes that method getSVGDocument and
      the native SVG implementations in Firefox 1.5 and Opera 9 do too.
    Your message has been successfully submitted and would be delivered to recipients shortly.