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 966667 of SVGTests

  • Revision slug: Web/API/SVGTests
  • Revision title: SVGTests
  • Revision id: 966667
  • Created:
  • Creator: jpmedley
  • Is current revision? No
  • Comment

Revision Content

{{APIRef("SVG")}}

SVG tests interface

Interface SVGTests defines an interface which applies to all elements which have attributes {{ SVGAttr("requiredFeatures") }}, {{ SVGAttr("requiredExtensions") }} and {{ SVGAttr("systemLanguage") }}.

Interface overview

Also implement None
Methods
  • boolean hasExtension(in {{ domxref("DOMString") }} extension)
Properties
  • readonly {{ domxref("SVGStringList") }} requiredFeatures
  • readonly {{ domxref("SVGStringList") }} requiredExtensions
  • readonly {{ domxref("SVGStringList") }} systemLanguage
Normative document SVG 1.1 (2nd Edition)

Properties

Name Type Description
requiredFeatures {{ domxref("SVGStringList") }} Corresponds to attribute {{ SVGAttr("requiredFeatures") }} on the given element.
requiredExtensions {{ domxref("SVGStringList") }} Corresponds to attribute {{ SVGAttr("requiredExtensions") }} on the given element.
systemLanguage {{ domxref("SVGStringList") }} Corresponds to attribute {{ SVGAttr("systemLanguage") }} on the given element.

Methods

Name & Arguments Return Description
hasExtension(in {{ domxref("DOMString") }} extension) boolean Returns true if the browser supports the given extension, specified by a URI.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatVersionUnknown }} [1] {{ CompatGeckoDesktop("12") }} 9.0 {{ CompatUnknown() }} {{ CompatUnknown() }}
Feature Android Android Webview Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{ CompatNo() }} {{ CompatVersionUnknown }} [1] {{ CompatGeckoMobile("12") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatVersionUnknown }} [1]

[1] The hasExtension() method was removed in Chrome 47.

Revision Source

<div>{{APIRef("SVG")}}</div>

<h2 id="SVG_tests_interface">SVG tests interface</h2>

<p>Interface <code>SVGTests</code> defines an interface which applies to all elements which have attributes {{ SVGAttr("requiredFeatures") }}, {{ SVGAttr("requiredExtensions") }} and {{ SVGAttr("systemLanguage") }}.</p>

<h3 id="Interface_overview">Interface overview</h3>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="row">Also&nbsp;implement</th>
   <td><em>None</em></td>
  </tr>
  <tr>
   <th scope="row">Methods</th>
   <td>
    <ul>
     <li><code>boolean hasExtension(in {{ domxref("DOMString") }} extension)</code></li>
    </ul>
   </td>
  </tr>
  <tr>
   <th scope="row">Properties</th>
   <td>
    <ul>
     <li>readonly {{ domxref("SVGStringList") }} <code>requiredFeatures</code></li>
     <li>readonly {{ domxref("SVGStringList") }} <code>requiredExtensions</code></li>
     <li>readonly {{ domxref("SVGStringList") }} <code>systemLanguage</code></li>
    </ul>
   </td>
  </tr>
  <tr>
   <th scope="row">Normative&nbsp;document</th>
   <td><a class="external" href="https://www.w3.org/TR/SVG11/types.html#InterfaceSVGTests" title="https://www.w3.org/TR/SVG11/types.html#InterfaceSVGTests">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>requiredFeatures</code></td>
   <td>{{ domxref("SVGStringList") }}</td>
   <td>Corresponds to attribute {{ SVGAttr("requiredFeatures") }} on the given element.</td>
  </tr>
  <tr>
   <td><code>requiredExtensions</code></td>
   <td>{{ domxref("SVGStringList") }}</td>
   <td>Corresponds to attribute {{ SVGAttr("requiredExtensions") }} on the given element.</td>
  </tr>
  <tr>
   <td><code>systemLanguage</code></td>
   <td>{{ domxref("SVGStringList") }}</td>
   <td>Corresponds to attribute {{ SVGAttr("systemLanguage") }} on the given element.</td>
  </tr>
 </tbody>
</table>

<h2 id="Methods">Methods</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th>Name &amp; Arguments</th>
   <th>Return</th>
   <th>Description</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code><strong>hasExtension</strong>(in {{ domxref("DOMString") }} <em>extension</em>)</code></td>
   <td>boolean</td>
   <td>Returns true if the browser supports the given extension, specified by a URI.</td>
  </tr>
 </tbody>
</table>

<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 }} [1]</td>
   <td>{{ CompatGeckoDesktop("12") }}</td>
   <td>9.0</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Android Webview</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
   <th>Chrome for Android</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{ CompatNo() }}</td>
   <td>{{ CompatVersionUnknown }} [1]</td>
   <td>{{ CompatGeckoMobile("12") }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatVersionUnknown }} [1]</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] The hasExtension() method was removed in Chrome 47.</p>
Revert to this revision