SVGSVGElement

abstract external class SVGSVGElement : 
    SVGGraphicsElement,
    SVGFitToViewBox,
    SVGZoomAndPan,
    WindowEventHandlers
(source)

Platform and version requirements: JS

Exposes the JavaScript SVGSVGElement to Kotlin

Constructors

<init>

SVGSVGElement()

Exposes the JavaScript SVGSVGElement to Kotlin

Properties

currentScale

open var currentScale: Float

currentTranslate

open val currentTranslate: DOMPointReadOnly

height

open val height: SVGAnimatedLength

width

open val width: SVGAnimatedLength

x

open val x: SVGAnimatedLength

y

open val y: SVGAnimatedLength

Inherited Properties

onafterprint

abstract var onafterprint: (Event) -> dynamic

onbeforeprint

abstract var onbeforeprint: (Event) -> dynamic

onbeforeunload

abstract var onbeforeunload: (Event) -> String?

onhashchange

abstract var onhashchange: (Event) -> dynamic

onlanguagechange

abstract var onlanguagechange: (Event) -> dynamic

onmessage

abstract var onmessage: (Event) -> dynamic

onoffline

abstract var onoffline: (Event) -> dynamic

ononline

abstract var ononline: (Event) -> dynamic

onpagehide

abstract var onpagehide: (Event) -> dynamic

onpageshow

abstract var onpageshow: (Event) -> dynamic

onpopstate

abstract var onpopstate: (Event) -> dynamic

onrejectionhandled

abstract var onrejectionhandled: (Event) -> dynamic

onstorage

abstract var onstorage: (Event) -> dynamic

onunhandledrejection

abstract var onunhandledrejection: (Event) -> dynamic

onunload

abstract var onunload: (Event) -> dynamic

preserveAspectRatio

abstract val preserveAspectRatio: SVGAnimatedPreserveAspectRatio

transform

open val transform: SVGAnimatedTransformList

viewBox

abstract val viewBox: SVGAnimatedRect

zoomAndPan

abstract var zoomAndPan: Short

Functions

checkEnclosure

fun checkEnclosure(
    element: SVGElement,
    rect: DOMRectReadOnly
): Boolean

checkIntersection

fun checkIntersection(
    element: SVGElement,
    rect: DOMRectReadOnly
): Boolean

createSVGAngle

fun createSVGAngle(): SVGAngle

createSVGLength

fun createSVGLength(): SVGLength

createSVGMatrix

fun createSVGMatrix(): DOMMatrix

createSVGNumber

fun createSVGNumber(): SVGNumber

createSVGPoint

fun createSVGPoint(): DOMPoint

createSVGRect

fun createSVGRect(): DOMRect

createSVGTransform

fun createSVGTransform(): SVGTransform

createSVGTransformFromMatrix

fun createSVGTransformFromMatrix(
    matrix: DOMMatrixReadOnly
): SVGTransform

deselectAll

fun deselectAll()

forceRedraw

fun forceRedraw()

getElementById

fun getElementById(elementId: String): Element

getEnclosureList

fun getEnclosureList(
    rect: DOMRectReadOnly,
    referenceElement: SVGElement?
): NodeList

getIntersectionList

fun getIntersectionList(
    rect: DOMRectReadOnly,
    referenceElement: SVGElement?
): NodeList

suspendRedraw

fun suspendRedraw(maxWaitMilliseconds: Int): Int

unsuspendRedraw

fun unsuspendRedraw(suspendHandleID: Int)

unsuspendRedrawAll

fun unsuspendRedrawAll()

Inherited Functions

getBBox

fun getBBox(
    options: SVGBoundingBoxOptions = definedExternally
): DOMRect

getCTM

fun getCTM(): DOMMatrix?

getScreenCTM

fun getScreenCTM(): DOMMatrix?

Companion Object Properties

SVG_ZOOMANDPAN_DISABLE

val SVG_ZOOMANDPAN_DISABLE: Short

SVG_ZOOMANDPAN_MAGNIFY

val SVG_ZOOMANDPAN_MAGNIFY: Short

SVG_ZOOMANDPAN_UNKNOWN

val SVG_ZOOMANDPAN_UNKNOWN: Short

Extension Properties

isElement

val Node.isElement: Boolean

Gets a value indicating whether this node is an Element.

isText

val Node.isText: Boolean

Gets a value indicating whether this node is a TEXT_NODE or a CDATA_SECTION_NODE.

Extension Functions

addClass

fun Element.addClass(vararg cssClasses: String): Boolean

Adds CSS class to element. Has no effect if all specified classes are already in class attribute of the element

appendElement

fun Element.appendElement(
    name: String,
    init: Element.() -> Unit
): Element

Appends a newly created element with the specified name to this element.

appendText

fun Element.appendText(text: String): Element

Creates text node and append it to the element.

clear

fun Node.clear()

Removes all the children from this node.

hasClass

fun Element.hasClass(cssClass: String): Boolean

Returns true if the element has the given CSS class style in its 'class' attribute

removeClass

fun Element.removeClass(vararg cssClasses: String): Boolean

Removes all cssClasses from element. Has no effect if all specified classes are missing in class attribute of the element