ladybird/Libraries/LibWeb/SVG/SVGSVGElement.idl
Andreas Kling 96e074b38f LibWeb: Make SVGSVGElement.getElementById() return Element? (nullable)
This is wrong in the spec, and there's already a bug open.
2025-01-21 02:06:33 +01:00

43 lines
1.7 KiB
Text

#import <SVG/SVGGraphicsElement.idl>
#import <SVG/SVGFitToViewBox.idl>
#import <Geometry/DOMRectReadOnly.idl>
// 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();
// FIXME: SVGNumber createSVGNumber();
SVGLength createSVGLength();
[FIXME] SVGAngle createSVGAngle();
DOMPoint createSVGPoint();
DOMMatrix createSVGMatrix();
DOMRect createSVGRect();
SVGTransform createSVGTransform();
[FIXME] SVGTransform createSVGTransformFromMatrix(optional DOMMatrix2DInit matrix = {});
// NOTE: The spec says this returns `Element` but that's a bug: https://github.com/w3c/svgwg/issues/923
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;