Document

JS
1.1
open class Document : 
    Node,
    GlobalEventHandlers,
    DocumentAndElementEventHandlers,
    NonElementParentNode,
    DocumentOrShadowRoot,
    ParentNode,
    GeometryUtils

Exposes the JavaScript Document to Kotlin

Constructors

JS
1.1

<init>

Exposes the JavaScript Document to Kotlin

Document()

Properties

JS
1.1

activeElement

open val activeElement: Element?
JS
1.1

alinkColor

var alinkColor: String
JS
1.1

all

open val all: HTMLAllCollection
JS
1.1

anchors

open val anchors: HTMLCollection
JS
1.1

applets

open val applets: HTMLCollection
JS
1.1

bgColor

var bgColor: String
JS
1.1

body

var body: HTMLElement?
JS
1.1

characterSet

open val characterSet: String
JS
1.1

charset

open val charset: String
JS
1.1

childElementCount

open val childElementCount: Int
JS
1.1

children

open val children: HTMLCollection
JS
1.1

compatMode

open val compatMode: String
JS
1.1

contentType

open val contentType: String
JS
1.1

cookie

var cookie: String
JS
1.1

currentScript

open val currentScript: HTMLOrSVGScriptElement?
JS
1.1

defaultView

open val defaultView: Window?
JS
1.1

designMode

var designMode: String
JS
1.1

dir

var dir: String
JS
1.1

doctype

open val doctype: DocumentType?
JS
1.1

documentElement

open val documentElement: Element?
JS
1.1

documentURI

open val documentURI: String
JS
1.1

domain

var domain: String
JS
1.1

embeds

open val embeds: HTMLCollection
JS
1.1

fgColor

var fgColor: String
JS
1.1

firstElementChild

open val firstElementChild: Element?
JS
1.1

forms

open val forms: HTMLCollection
JS
1.1

fullscreen

open val fullscreen: Boolean
JS
1.1

fullscreenElement

open val fullscreenElement: Element?
JS
1.1

fullscreenEnabled

open val fullscreenEnabled: Boolean
JS
1.1

head

open val head: HTMLHeadElement?
JS
1.1

images

open val images: HTMLCollection
JS
1.1

implementation

open val implementation: DOMImplementation
JS
1.1

inputEncoding

open val inputEncoding: String
JS
1.1

lastElementChild

open val lastElementChild: Element?
JS
1.1

lastModified

open val lastModified: String
JS
1.1

linkColor

var linkColor: String
JS
1.1

links

open val links: HTMLCollection
JS
1.1

location

open val location: Location?
JS
1.1

onabort

open var onabort: ((Event) -> dynamic)?
JS
1.1

onblur

open var onblur: ((FocusEvent) -> dynamic)?
JS
1.1

oncancel

open var oncancel: ((Event) -> dynamic)?
JS
1.1

oncanplay

open var oncanplay: ((Event) -> dynamic)?
JS
1.1

oncanplaythrough

open var oncanplaythrough: ((Event) -> dynamic)?
JS
1.1

onchange

open var onchange: ((Event) -> dynamic)?
JS
1.1

onclick

open var onclick: ((MouseEvent) -> dynamic)?
JS
1.1

onclose

open var onclose: ((Event) -> dynamic)?
JS
1.1

oncontextmenu

open var oncontextmenu: ((MouseEvent) -> dynamic)?
JS
1.1

oncopy

open var oncopy: ((ClipboardEvent) -> dynamic)?
JS
1.1

oncuechange

open var oncuechange: ((Event) -> dynamic)?
JS
1.1

oncut

open var oncut: ((ClipboardEvent) -> dynamic)?
JS
1.1

ondblclick

open var ondblclick: ((MouseEvent) -> dynamic)?
JS
1.1

ondrag

open var ondrag: ((DragEvent) -> dynamic)?
JS
1.1

ondragend

open var ondragend: ((DragEvent) -> dynamic)?
JS
1.1

ondragenter

open var ondragenter: ((DragEvent) -> dynamic)?
JS
1.1

ondragexit

open var ondragexit: ((DragEvent) -> dynamic)?
JS
1.1

ondragleave

open var ondragleave: ((DragEvent) -> dynamic)?
JS
1.1

ondragover

open var ondragover: ((DragEvent) -> dynamic)?
JS
1.1

ondragstart

open var ondragstart: ((DragEvent) -> dynamic)?
JS
1.1

ondrop

open var ondrop: ((DragEvent) -> dynamic)?
JS
1.1

ondurationchange

open var ondurationchange: ((Event) -> dynamic)?
JS
1.1

onemptied

open var onemptied: ((Event) -> dynamic)?
JS
1.1

onended

open var onended: ((Event) -> dynamic)?
JS
1.1

onerror

open var onerror: ((dynamic, String, Int, Int, Any?) -> dynamic)?
JS
1.1

onfocus

open var onfocus: ((FocusEvent) -> dynamic)?
JS
1.1

onfullscreenchange

var onfullscreenchange: ((Event) -> dynamic)?
JS
1.1

onfullscreenerror

var onfullscreenerror: ((Event) -> dynamic)?
JS
1.1

ongotpointercapture

open var ongotpointercapture: ((PointerEvent) -> dynamic)?
JS
1.1

oninput

open var oninput: ((InputEvent) -> dynamic)?
JS
1.1

oninvalid

open var oninvalid: ((Event) -> dynamic)?
JS
1.1

onkeydown

open var onkeydown: ((KeyboardEvent) -> dynamic)?
JS
1.1

onkeypress

open var onkeypress: ((KeyboardEvent) -> dynamic)?
JS
1.1

onkeyup

open var onkeyup: ((KeyboardEvent) -> dynamic)?
JS
1.1

onload

open var onload: ((Event) -> dynamic)?
JS
1.1

onloadeddata

open var onloadeddata: ((Event) -> dynamic)?
JS
1.1

onloadedmetadata

open var onloadedmetadata: ((Event) -> dynamic)?
JS
1.1

onloadend

open var onloadend: ((Event) -> dynamic)?
JS
1.1

onloadstart

open var onloadstart: ((ProgressEvent) -> dynamic)?
JS
1.1

onlostpointercapture

open var onlostpointercapture: ((PointerEvent) -> dynamic)?
JS
1.1

onmousedown

open var onmousedown: ((MouseEvent) -> dynamic)?
JS
1.1

onmouseenter

open var onmouseenter: ((MouseEvent) -> dynamic)?
JS
1.1

onmouseleave

open var onmouseleave: ((MouseEvent) -> dynamic)?
JS
1.1

onmousemove

open var onmousemove: ((MouseEvent) -> dynamic)?
JS
1.1

onmouseout

open var onmouseout: ((MouseEvent) -> dynamic)?
JS
1.1

onmouseover

open var onmouseover: ((MouseEvent) -> dynamic)?
JS
1.1

onmouseup

open var onmouseup: ((MouseEvent) -> dynamic)?
JS
1.1

onpaste

open var onpaste: ((ClipboardEvent) -> dynamic)?
JS
1.1

onpause

open var onpause: ((Event) -> dynamic)?
JS
1.1

onplay

open var onplay: ((Event) -> dynamic)?
JS
1.1

onplaying

open var onplaying: ((Event) -> dynamic)?
JS
1.1

onpointercancel

open var onpointercancel: ((PointerEvent) -> dynamic)?
JS
1.1

onpointerdown

open var onpointerdown: ((PointerEvent) -> dynamic)?
JS
1.1

onpointerenter

open var onpointerenter: ((PointerEvent) -> dynamic)?
JS
1.1

onpointerleave

open var onpointerleave: ((PointerEvent) -> dynamic)?
JS
1.1

onpointermove

open var onpointermove: ((PointerEvent) -> dynamic)?
JS
1.1

onpointerout

open var onpointerout: ((PointerEvent) -> dynamic)?
JS
1.1

onpointerover

open var onpointerover: ((PointerEvent) -> dynamic)?
JS
1.1

onpointerup

open var onpointerup: ((PointerEvent) -> dynamic)?
JS
1.1

onprogress

open var onprogress: ((ProgressEvent) -> dynamic)?
JS
1.1

onratechange

open var onratechange: ((Event) -> dynamic)?
JS
1.1

onreadystatechange

var onreadystatechange: ((Event) -> dynamic)?
JS
1.1

onreset

open var onreset: ((Event) -> dynamic)?
JS
1.1

onresize

open var onresize: ((Event) -> dynamic)?
JS
1.1

onscroll

open var onscroll: ((Event) -> dynamic)?
JS
1.1

onseeked

open var onseeked: ((Event) -> dynamic)?
JS
1.1

onseeking

open var onseeking: ((Event) -> dynamic)?
JS
1.1

onselect

open var onselect: ((Event) -> dynamic)?
JS
1.1

onshow

open var onshow: ((Event) -> dynamic)?
JS
1.1

onstalled

open var onstalled: ((Event) -> dynamic)?
JS
1.1

onsubmit

open var onsubmit: ((Event) -> dynamic)?
JS
1.1

onsuspend

open var onsuspend: ((Event) -> dynamic)?
JS
1.1

ontimeupdate

open var ontimeupdate: ((Event) -> dynamic)?
JS
1.1

ontoggle

open var ontoggle: ((Event) -> dynamic)?
JS
1.1

onvolumechange

open var onvolumechange: ((Event) -> dynamic)?
JS
1.1

onwaiting

open var onwaiting: ((Event) -> dynamic)?
JS
1.1

onwheel

open var onwheel: ((WheelEvent) -> dynamic)?
JS
1.1

origin

open val origin: String
JS
1.1

plugins

open val plugins: HTMLCollection
JS
1.1

readyState

open val readyState: DocumentReadyState
JS
1.1

referrer

open val referrer: String
JS
1.1

rootElement

open val rootElement: SVGSVGElement?
JS
1.1

scripts

open val scripts: HTMLCollection
JS
1.1

scrollingElement

open val scrollingElement: Element?
JS
1.1

styleSheets

open val styleSheets: StyleSheetList
JS
1.1

title

var title: String
JS
1.1

URL

open val URL: String
JS
1.1

vlinkColor

var vlinkColor: String

Functions

JS
1.1

adoptNode

fun adoptNode(node: Node): Node
JS
1.1

append

open fun append(vararg nodes: dynamic)
JS
1.1

captureEvents

fun captureEvents()
JS
1.1

caretPositionFromPoint

fun caretPositionFromPoint(
    x: Double,
    y: Double
): CaretPosition?
JS
1.1

clear

fun clear()
JS
1.1

close

fun close()
JS
1.1

convertPointFromNode

open fun convertPointFromNode(
    point: DOMPointInit,
    from: dynamic,
    options: ConvertCoordinateOptions
): DOMPoint
JS
1.1

convertQuadFromNode

open fun convertQuadFromNode(
    quad: dynamic,
    from: dynamic,
    options: ConvertCoordinateOptions
): DOMQuad
JS
1.1

convertRectFromNode

open fun convertRectFromNode(
    rect: DOMRectReadOnly,
    from: dynamic,
    options: ConvertCoordinateOptions
): DOMQuad
JS
1.1

createAttribute

fun createAttribute(localName: String): Attr
JS
1.1

createAttributeNS

fun createAttributeNS(
    namespace: String?,
    qualifiedName: String
): Attr
JS
1.1

createCDATASection

fun createCDATASection(data: String): CDATASection
JS
1.1

createComment

fun createComment(data: String): Comment
JS
1.1

createDocumentFragment

fun createDocumentFragment(): DocumentFragment
JS
1.1

createElement

fun createElement(
    localName: String,
    options: ElementCreationOptions = definedExternally
): Element
JS
1.1

createElementNS

fun createElementNS(
    namespace: String?,
    qualifiedName: String,
    options: ElementCreationOptions = definedExternally
): Element
JS
1.1

createEvent

fun createEvent(interface: String): Event
JS
1.1

createNodeIterator

fun createNodeIterator(
    root: Node,
    whatToShow: Int = definedExternally,
    filter: NodeFilter? = definedExternally
): NodeIterator
fun createNodeIterator(
    root: Node,
    whatToShow: Int = definedExternally,
    filter: ((Node) -> Short)? = definedExternally
): NodeIterator
JS
1.1

createProcessingInstruction

fun createProcessingInstruction(
    target: String,
    data: String
): ProcessingInstruction
JS
1.1

createRange

fun createRange(): Range
JS
1.1

createTextNode

fun createTextNode(data: String): Text
JS
1.1

createTouch

fun createTouch(
    view: Window,
    target: EventTarget,
    identifier: Int,
    pageX: Int,
    pageY: Int,
    screenX: Int,
    screenY: Int
): Touch
JS
1.1

createTouchList

fun createTouchList(vararg touches: Touch): TouchList
JS
1.1

createTreeWalker

fun createTreeWalker(
    root: Node,
    whatToShow: Int = definedExternally,
    filter: NodeFilter? = definedExternally
): TreeWalker
fun createTreeWalker(
    root: Node,
    whatToShow: Int = definedExternally,
    filter: ((Node) -> Short)? = definedExternally
): TreeWalker
JS
1.1

elementFromPoint

fun elementFromPoint(x: Double, y: Double): Element?
JS
1.1

elementsFromPoint

fun elementsFromPoint(x: Double, y: Double): Array<Element>
JS
1.1

execCommand

fun execCommand(
    commandId: String,
    showUI: Boolean = definedExternally,
    value: String = definedExternally
): Boolean
JS
1.1

exitFullscreen

fun exitFullscreen(): Promise<Unit>
JS
1.1

getBoxQuads

open fun getBoxQuads(options: BoxQuadOptions): Array<DOMQuad>
JS
1.1

getElementById

open fun getElementById(elementId: String): Element?
JS
1.1

getElementsByClassName

fun getElementsByClassName(
    classNames: String
): HTMLCollection
JS
1.1

getElementsByName

fun getElementsByName(elementName: String): NodeList
JS
1.1

getElementsByTagName

fun getElementsByTagName(
    qualifiedName: String
): HTMLCollection
JS
1.1

getElementsByTagNameNS

fun getElementsByTagNameNS(
    namespace: String?,
    localName: String
): HTMLCollection
JS
1.1

hasFocus

fun hasFocus(): Boolean
JS
1.1

importNode

fun importNode(
    node: Node,
    deep: Boolean = definedExternally
): Node
JS
1.1

open

fun open(
    type: String = definedExternally,
    replace: String = definedExternally
): Document
fun open(url: String, name: String, features: String): Window
JS
1.1

prepend

open fun prepend(vararg nodes: dynamic)
JS
1.1

queryCommandEnabled

fun queryCommandEnabled(commandId: String): Boolean
JS
1.1

queryCommandIndeterm

fun queryCommandIndeterm(commandId: String): Boolean
JS
1.1

queryCommandState

fun queryCommandState(commandId: String): Boolean
JS
1.1

queryCommandSupported

fun queryCommandSupported(commandId: String): Boolean
JS
1.1

queryCommandValue

fun queryCommandValue(commandId: String): String
JS
1.1

querySelector

open fun querySelector(selectors: String): Element?
JS
1.1

querySelectorAll

open fun querySelectorAll(selectors: String): NodeList
JS
1.1

releaseEvents

fun releaseEvents()
JS
1.1

write

fun write(vararg text: String)
JS
1.1

writeln

fun writeln(vararg text: String)

Companion Object Properties

JS
1.1

ATTRIBUTE_NODE

val ATTRIBUTE_NODE: Short
JS
1.1

CDATA_SECTION_NODE

val CDATA_SECTION_NODE: Short
JS
1.1

COMMENT_NODE

val COMMENT_NODE: Short
JS
1.1

DOCUMENT_FRAGMENT_NODE

val DOCUMENT_FRAGMENT_NODE: Short
JS
1.1

DOCUMENT_NODE

val DOCUMENT_NODE: Short
JS
1.1

DOCUMENT_POSITION_CONTAINED_BY

val DOCUMENT_POSITION_CONTAINED_BY: Short
JS
1.1

DOCUMENT_POSITION_CONTAINS

val DOCUMENT_POSITION_CONTAINS: Short
JS
1.1

DOCUMENT_POSITION_DISCONNECTED

val DOCUMENT_POSITION_DISCONNECTED: Short
JS
1.1

DOCUMENT_POSITION_FOLLOWING

val DOCUMENT_POSITION_FOLLOWING: Short
JS
1.1

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

val DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: Short
JS
1.1

DOCUMENT_POSITION_PRECEDING

val DOCUMENT_POSITION_PRECEDING: Short
JS
1.1

DOCUMENT_TYPE_NODE

val DOCUMENT_TYPE_NODE: Short
JS
1.1

ELEMENT_NODE

val ELEMENT_NODE: Short
JS
1.1

ENTITY_NODE

val ENTITY_NODE: Short
JS
1.1

ENTITY_REFERENCE_NODE

val ENTITY_REFERENCE_NODE: Short
JS
1.1

NOTATION_NODE

val NOTATION_NODE: Short
JS
1.1

PROCESSING_INSTRUCTION_NODE

val PROCESSING_INSTRUCTION_NODE: Short
JS
1.1

TEXT_NODE

val TEXT_NODE: Short

Extension Properties

JS
1.1

isElement

Gets a value indicating whether this node is an Element.

val Node.isElement: Boolean
JS
1.1

isText

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

val Node.isText: Boolean

Extension Functions

JS
1.1

clear

Removes all the children from this node.

fun Node.clear()
JS
1.1

createElement

Creates a new element with the specified name.

fun Document.createElement(
    name: String,
    init: Element.() -> Unit
): Element
JS
1.1

get

operator fun Document.get(name: String): dynamic

Inheritors

JS
1.1

XMLDocument

Exposes the JavaScript XMLDocument to Kotlin

open class XMLDocument : Document