Declaration of the Document Object Model for the JavaScript backend.
Types
EventTarget* = ref EventTargetObj
- Source
Window* = ref WindowObj
- Source
Frame* = ref FrameObj
- Source
ClassList* = ref ClassListObj
- Source
NodeType* = enum ElementNode = 1, AttributeNode, TextNode, CDATANode, EntityRefNode, EntityNode, ProcessingInstructionNode, CommentNode, DocumentNode, DocumentTypeNode, DocumentFragmentNode, NotationNode
- Source
Node* = ref NodeObj
- Source
Document* = ref DocumentObj
- Source
Element* = ref ElementObj
- Source
LinkElement* = ref LinkObj
- Source
EmbedElement* = ref EmbedObj
- Source
AnchorElement* = ref AnchorObj
- Source
OptionElement* = ref OptionObj
- Source
FormElement* = ref FormObj
- Source
ImageElement* = ref ImageObj
- Source
Event* = ref EventObj
- Source
Location* = ref LocationObj
- Source
History* = ref HistoryObj
- Source
- Source
TPlugin* {.importc.} = object of RootObj description*: cstring filename*: cstring name*: cstring
- Source
TMimeType* {.importc.} = object of RootObj description*: cstring enabledPlugin*: ref TPlugin suffixes*: seq[cstring] `type`*: cstring
- Source
TLocationBar* {.importc.} = object of RootObj visible*: bool
- Source
TMenuBar* = TLocationBar
- Source
TPersonalBar* = TLocationBar
- Source
TScrollBars* = TLocationBar
- Source
TToolBar* = TLocationBar
- Source
TStatusBar* = TLocationBar
- Source
TTimeOut* {.importc.} = object of RootObj
- Source
TInterval* {.importc.} = object of RootObj
- Source
TEventHandlers* {.deprecated.} = EventTargetObj
- Source
TWindow* {.deprecated.} = WindowObj
- Source
TFrame* {.deprecated.} = FrameObj
- Source
TNode* {.deprecated.} = NodeObj
- Source
TDocument* {.deprecated.} = DocumentObj
- Source
TElement* {.deprecated.} = ElementObj
- Source
TLink* {.deprecated.} = LinkObj
- Source
TEmbed* {.deprecated.} = EmbedObj
- Source
TAnchor* {.deprecated.} = AnchorObj
- Source
TOption* {.deprecated.} = OptionObj
- Source
TForm* {.deprecated.} = FormObj
- Source
TImage* {.deprecated.} = ImageObj
- Source
TNodeType* {.deprecated.} = NodeType
- Source
TEvent* {.deprecated.} = EventObj
- Source
TLocation* {.deprecated.} = LocationObj
- Source
THistory* {.deprecated.} = HistoryObj
- Source
- Source
TStyle* {.deprecated.} = StyleObj
- Source
TScreen* {.deprecated.} = ScreenObj
- Source
TApplet* {.importc, deprecated.} = object of RootObj
- Source
Procs
proc addEventListener*(et: EventTarget; ev: cstring; cb: proc (ev: Event); useCapture: bool = false)
- Source
proc alert*(w: Window; msg: cstring)
- Source
proc back*(w: Window)
- Source
proc blur*(w: Window)
- Source
proc captureEvents*(w: Window; eventMask: int) {.deprecated.}
- Source
proc clearInterval*(w: Window; interval: ref TInterval)
- Source
proc clearTimeout*(w: Window; timeout: ref TTimeOut)
- Source
proc close*(w: Window)
- Source
proc confirm*(w: Window; msg: cstring): bool
- Source
proc disableExternalCapture*(w: Window)
- Source
proc enableExternalCapture*(w: Window)
- Source
proc find*(w: Window; text: cstring; caseSensitive = false; backwards = false)
- Source
proc focus*(w: Window)
- Source
proc forward*(w: Window)
- Source
proc handleEvent*(w: Window; e: Event)
- Source
proc home*(w: Window)
- Source
proc moveBy*(w: Window; x, y: int)
- Source
proc moveTo*(w: Window; x, y: int)
- Source
proc open*(w: Window; uri, windowname: cstring; properties: cstring = nil): Window
- Source
proc print*(w: Window)
- Source
proc prompt*(w: Window; text, default: cstring): cstring
- Source
proc releaseEvents*(w: Window; eventMask: int) {.deprecated.}
- Source
proc resizeBy*(w: Window; x, y: int)
- Source
proc resizeTo*(w: Window; x, y: int)
- Source
proc routeEvent*(w: Window; event: Event)
- Source
proc scrollBy*(w: Window; x, y: int)
- Source
proc scrollTo*(w: Window; x, y: int)
- Source
proc setInterval*(w: Window; code: cstring; pause: int): ref TInterval
- Source
proc setTimeout*(w: Window; code: cstring; pause: int): ref TTimeOut
- Source
proc stop*(w: Window)
- Source
proc appendChild*(n, child: Node)
- Source
proc appendData*(n: Node; data: cstring)
- Source
proc cloneNode*(n: Node; copyContent: bool): Node
- Source
proc deleteData*(n: Node; start, len: int)
- Source
proc getAttribute*(n: Node; attr: cstring): cstring
- Source
proc getAttributeNode*(n: Node; attr: cstring): Node
- Source
proc hasChildNodes*(n: Node): bool
- Source
proc insertBefore*(n, newNode, before: Node)
- Source
proc insertData*(n: Node; position: int; data: cstring)
- Source
proc removeAttribute*(n: Node; attr: cstring)
- Source
proc removeAttributeNode*(n, attr: Node)
- Source
proc removeChild*(n, child: Node)
- Source
proc replaceChild*(n, newNode, oldNode: Node)
- Source
proc replaceData*(n: Node; start, len: int; text: cstring)
- Source
proc scrollIntoView*(n: Node)
- Source
proc setAttribute*(n: Node; name, value: cstring)
- Source
proc setAttributeNode*(n: Node; attr: Node)
- Source
proc captureEvents*(d: Document; eventMask: int) {.deprecated.}
- Source
proc createAttribute*(d: Document; identifier: cstring): Node
- Source
proc createElement*(d: Document; identifier: cstring): Element
- Source
proc createTextNode*(d: Document; identifier: cstring): Node
- Source
proc getElementById*(d: Document; id: cstring): Element
- Source
proc getElementsByName*(d: Document; name: cstring): seq[Element]
- Source
proc getElementsByTagName*(d: Document; name: cstring): seq[Element]
- Source
proc getElementsByClassName*(d: Document; name: cstring): seq[Element]
- Source
proc getSelection*(d: Document): cstring
- Source
proc handleEvent*(d: Document; event: Event)
- Source
proc open*(d: Document)
- Source
proc releaseEvents*(d: Document; eventMask: int) {.deprecated.}
- Source
proc routeEvent*(d: Document; event: Event)
- Source
proc write*(d: Document; text: cstring)
- Source
proc writeln*(d: Document; text: cstring)
- Source
proc blur*(e: Element)
- Source
proc click*(e: Element)
- Source
proc focus*(e: Element)
- Source
proc handleEvent*(e: Element; event: Event)
- Source
proc select*(e: Element)
- Source
proc getElementsByTagName*(e: Element; name: cstring): seq[Element]
- Source
proc getElementsByClassName*(e: Element; name: cstring): seq[Element]
- Source
proc reset*(f: FormElement)
- Source
proc submit*(f: FormElement)
- Source
proc play*(e: EmbedElement)
- Source
proc stop*(e: EmbedElement)
- Source
proc reload*(loc: Location)
- Source
proc replace*(loc: Location; s: cstring)
- Source
proc back*(h: History)
- Source
proc forward*(h: History)
- Source
proc go*(h: History; pagesToJump: int)
- Source
proc javaEnabled*(h: Navigator): bool
- Source
proc add*(c: ClassList; class: cstring)
- Source
proc remove*(c: ClassList; class: cstring)
- Source
proc contains*(c: ClassList; class: cstring): bool
- Source
proc toggle*(c: ClassList; class: cstring)
- Source
proc getAttribute*(s: Style; attr: cstring; caseSensitive = false): cstring
- Source
proc removeAttribute*(s: Style; attr: cstring; caseSensitive = false)
- Source
proc setAttribute*(s: Style; attr, value: cstring; caseSensitive = false)
- Source
proc decodeURI*(uri: cstring): cstring {.importc, nodecl.}
- Source
proc encodeURI*(uri: cstring): cstring {.importc, nodecl.}
- Source
proc escape*(uri: cstring): cstring {.importc, nodecl.}
- Source
proc unescape*(uri: cstring): cstring {.importc, nodecl.}
- Source
proc decodeURIComponent*(uri: cstring): cstring {.importc, nodecl.}
- Source
proc encodeURIComponent*(uri: cstring): cstring {.importc, nodecl.}
- Source
proc isFinite*(x: BiggestFloat): bool {.importc, nodecl.}
- Source
proc isNaN*(x: BiggestFloat): bool {.importc, nodecl.}
- Source
proc parseFloat*(s: cstring): BiggestFloat {.importc, nodecl.}
- Source
proc parseInt*(s: cstring): int {.importc, nodecl.}
- Source
proc parseInt*(s: cstring; radix: int): int {.importc, nodecl.}
- Source