Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 81245 of SVGElement

  • Revision slug: DOM/SVGElement
  • Revision title: SVGElement
  • Revision id: 81245
  • Created:
  • Creator: Jeremie
  • Is current revision? No
  • Comment page created, 197 words added

Revision Content

SVG element interface

All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface.

Interface overview

Also implement See generic DOM {{ domxref("Element") }} interface.
Methods None
Properties
  • readonly {{ domxref("DOMString") }} id
  • readonly {{ domxref("DOMString") }} xmlbase
  • readonly {{ domxref("SVGSVGElement") }} ownerSVGElement
  • readonly {{ domxref("SVGElement") }} viewportElement
Normative document SVG 1.1 (2nd Edition)

Properties

Name Type Description
id {{ domxref("DOMString") }} The value of the {{ SVGAttr("id") }} attribute on the given element, or the empty string if id is not present.
xmlbase {{ domxref("DOMString") }} Corresponds to attribute {{ SVGAttr("xml:base") }} on the given element.
ownerSVGElement {{ domxref("SVGSVGElement") }}

The nearest ancestor {{ SVGElement("svg") }} element. Null if the given element is the outermost svg element.

viewportElement {{ domxref("SVGElement") }}

The element which established the current viewport. Often, the nearest ancestor {{ SVGElement("svg") }} element. Null if the given element is the outermost svg element.

Methods

The SVGElement interface do not provide any specific methods.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }} 9.0 {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatVersionUnknown() }} {{ CompatUnknown() }} {{ CompatVersionUnknown() }} {{ CompatVersionUnknown() }}

See also

  • DOM {{ SVGElement("element") }} reference

Revision Source

<h2 id="SVG_element_interface">SVG element interface</h2>
<p>All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the <code>SVGElement</code> interface.</p>
<h3 id="Interface_overview">Interface overview</h3>
<table class="standard-table"> <tbody> <tr> <th scope="row">Also implement</th> <td>See generic DOM {{ domxref("Element") }} interface.</td> </tr> <tr> <th scope="row">Methods</th> <td><em>None</em></td> </tr> <tr> <th scope="row">Properties</th> <td> <ul> <li>readonly {{ domxref("DOMString") }} <code>id</code></li> <li>readonly {{ domxref("DOMString") }} <code>xmlbase</code></li> <li>readonly {{ domxref("SVGSVGElement") }} <code>ownerSVGElement</code></li> <li>readonly {{ domxref("SVGElement") }} <code>viewportElement</code></li> </ul> </td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="https://www.w3.org/TR/SVG11/types.html#InterfaceSVGElement" title="https://www.w3.org/TR/SVG11/types.html#InterfaceSVGElement">SVG 1.1 (2nd Edition)</a></td> </tr> </tbody>
</table>
<h2 id="Properties">Properties</h2>
<table class="standard-table"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><code>id</code></td> <td>{{ domxref("DOMString") }}</td> <td>The value of the {{ SVGAttr("id") }} attribute on the given element, or the empty string if <code>id</code> is not present. </td> </tr> <tr> <td><code>xmlbase</code></td> <td>{{ domxref("DOMString") }}</td> <td>Corresponds to attribute {{ SVGAttr("xml:base") }} on the given element.</td> </tr> <tr> <td><code>ownerSVGElement</code></td> <td>{{ domxref("SVGSVGElement") }}</td> <td> <p>The nearest ancestor {{ SVGElement("svg") }} element. <code>Null</code> if the given element is the outermost svg element.</p> </td> </tr> <tr> <td><code>viewportElement</code></td> <td>{{ domxref("SVGElement") }}</td> <td> <p>The element which established the current viewport. Often, the nearest ancestor {{ SVGElement("svg") }} element. <code>Null</code> if the given element is the outermost svg element.</p> </td> </tr> </tbody>
</table>
<h2 id="Methods">Methods</h2>
<p>The <code>SVGElement</code> interface do not provide any specific methods.</p>
<h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari (WebKit)</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>9.0</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{ CompatNo() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> <td>{{ CompatVersionUnknown() }}</td> </tr> </tbody>
</table>
</div>
<h2 id="See_also">See also</h2>
<ul> <li>DOM {{ SVGElement("element") }} reference</li>
</ul>
Revert to this revision