Skip to content

Truly independent web browser

1.9 KB
Raw Blame
// https://svgwg.org/svg2-draft/struct.html#InterfaceSVGSVGElement
[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();

    [NewObject] SVGNumber createSVGNumber();
    [NewObject] SVGLength createSVGLength();
    [NewObject] SVGAngle createSVGAngle();
    [NewObject] DOMPoint createSVGPoint();
    [NewObject] DOMMatrix createSVGMatrix();
    [NewObject] DOMRect createSVGRect();
    [NewObject] SVGTransform createSVGTransform();
    [NewObject] 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;

// https://svgwg.org/specs/animations/#InterfaceSVGSVGElement
partial interface SVGSVGElement {
    undefined pauseAnimations();
    undefined unpauseAnimations();
    boolean animationsPaused();
    float getCurrentTime();
    undefined setCurrentTime(float seconds);
};