Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

getSVGDocument method

Gets Document object for the referenced document, or null if there is no document.

Scalable Vector Graphics: Document Structure, Section 5.11.13Internet Explorer 10

Syntax


HRESULT retVal = object.getSVGDocument(retVal);

Parameters

retVal [out, retval]

Type: SVGDocument

Return value

Type: HRESULT

This method can return one of these values.

S_OK

Standards information

Examples

The following example shows how to obtain a reference to the SVG document loaded into an object element.



<!DOCTYPE html>
<html>
<head>
  <title>GetSVGDocument Example</title>
  <script>
    function getDocument() {
      var svgDoc = document.getElementById("SVGDoc").getSVGDocument();
      alert(svgDoc);
    }
  </script>
</head>

<body>
  <button onclick="getDocument();">Show SVG Document</button>
  <br />
  <object id="SVGDoc" type="image/svg+xml" data="example.svg"></object>
</body>
</html>

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.