SVG image interface
The SVGImageElement
interface corresponds to the {{ SVGElement("image") }} element.
Interface overview
Also implement | {{ domxref("SVGElement") }}, {{ domxref("SVGURIReference") }}, {{ domxref("SVGTests") }}, {{ domxref("SVGLangSpace") }}, {{ domxref("SVGExternalResourcesRequired") }}, {{ domxref("SVGStylable") }}, {{ domxref("SVGTransformable") }} |
Methods | None |
Properties | - readonly {{ domxref("SVGAnimatedLength") }}
x - readonly {{ domxref("SVGAnimatedLength") }}
y - readonly {{ domxref("SVGAnimatedLength") }}
width - readonly {{ domxref("SVGAnimatedLength") }}
height - readonly {{ domxref("SVGAnimatedPreserveAspectRatio") }}
preserveAspectRatio |
Normative document | SVG 1.1 (2nd Edition) |
Properties
Name | Type | Description |
x | {{ domxref("SVGAnimatedLength") }} | Corresponds to attribute {{ SVGAttr("x") }} on the given {{ SVGElement("image") }} element. |
y | {{ domxref("SVGAnimatedLength") }} | Corresponds to attribute {{ SVGAttr("y") }} on the given {{ SVGElement("image") }} element. |
width | {{ domxref("SVGAnimatedLength") }} | Corresponds to attribute {{ SVGAttr("width") }} on the given {{ SVGElement("image") }} element. |
height | {{ domxref("SVGAnimatedLength") }} | Corresponds to attribute {{ SVGAttr("height") }} on the given {{ SVGElement("image") }} element. |
preserveAspectRatio | {{ domxref("SVGAnimatedPreserveAspectRatio") }} | Corresponds to attribute {{ SVGAttr("preserveAspectRatio") }} on the given {{ SVGElement("image") }} element. |
Methods
The SVGImageElement
interface do not provide any specific methods.
Browser compatibility
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
Basic support | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
Basic support | {{ CompatNo() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} | {{ CompatUnknown() }} |