Definition
Scalable Vector Graphics (SVG) 2 defines SVGSVGElement
[Exposed=Window]
interface SVGSVGElement : SVGGraphicsElement {
[SameObject] readonly attribute SVGAnimatedLength x;
[SameObject] readonly attribute SVGAnimatedLength y;
[SameObject] readonly attribute SVGAnimatedLength width;
[SameObject] readonly attribute SVGAnimatedLength height;
attribute float currentScale;
[SameObject] readonly attribute DOMPointReadOnly currentTranslate;
NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement);
NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement);
boolean checkIntersection(SVGElement element, DOMRectReadOnly rect);
boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect);
undefined deselectAll();
SVGNumber createSVGNumber();
SVGLength createSVGLength();
SVGAngle createSVGAngle();
DOMPoint createSVGPoint();
DOMMatrix createSVGMatrix();
DOMRect createSVGRect();
SVGTransform createSVGTransform();
SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
Element getElementById(DOMString elementId);
// Deprecated methods that have no effect when called,
// but which are kept for compatibility reasons.
unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
undefined unsuspendRedraw(unsigned long suspendHandleID);
undefined unsuspendRedrawAll();
undefined forceRedraw();
};
SVGSVGElement includes SVGFitToViewBox;
SVGSVGElement includes WindowEventHandlers;
This interface is extended in the following specifications:
- SVG Animations
partial interface SVGSVGElement { undefined pauseAnimations(); undefined unpauseAnimations(); boolean animationsPaused(); float getCurrentTime(); undefined setCurrentTime(float seconds); };
Consolidated IDL (across mixin and partials)
[Exposed=Window]
interface SVGSVGElement : SVGGraphicsElement {
[SameObject] readonly attribute SVGAnimatedLength x;
[SameObject] readonly attribute SVGAnimatedLength y;
[SameObject] readonly attribute SVGAnimatedLength width;
[SameObject] readonly attribute SVGAnimatedLength height;
attribute float currentScale;
[SameObject] readonly attribute DOMPointReadOnly currentTranslate;
NodeList getIntersectionList(DOMRectReadOnly rect, SVGElement? referenceElement);
NodeList getEnclosureList(DOMRectReadOnly rect, SVGElement? referenceElement);
boolean checkIntersection(SVGElement element, DOMRectReadOnly rect);
boolean checkEnclosure(SVGElement element, DOMRectReadOnly rect);
undefined deselectAll();
SVGNumber createSVGNumber();
SVGLength createSVGLength();
SVGAngle createSVGAngle();
DOMPoint createSVGPoint();
DOMMatrix createSVGMatrix();
DOMRect createSVGRect();
SVGTransform createSVGTransform();
SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
Element getElementById(DOMString elementId);
// Deprecated methods that have no effect when called,
// but which are kept for compatibility reasons.
unsigned long suspendRedraw(unsigned long maxWaitMilliseconds);
undefined unsuspendRedraw(unsigned long suspendHandleID);
undefined unsuspendRedrawAll();
undefined forceRedraw();
[SameObject] readonly attribute SVGAnimatedRect viewBox;
[SameObject] readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
attribute EventHandler onafterprint;
attribute EventHandler onbeforeprint;
attribute OnBeforeUnloadEventHandler onbeforeunload;
attribute EventHandler onhashchange;
attribute EventHandler onlanguagechange;
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onpagehide;
attribute EventHandler onpagereveal;
attribute EventHandler onpageshow;
attribute EventHandler onpageswap;
attribute EventHandler onpopstate;
attribute EventHandler onrejectionhandled;
attribute EventHandler onstorage;
attribute EventHandler onunhandledrejection;
attribute EventHandler onunload;
undefined pauseAnimations();
undefined unpauseAnimations();
boolean animationsPaused();
float getCurrentTime();
undefined setCurrentTime(float seconds);
};
Methods and attributes that return objects implementing SVGSVGElement
Referring IDL interfaces/dictionaries
Referring specifications
- SVG Animations refers to
SVGSVGElement