dom

    Dark Mode
Search:

Declaration of the Document Object Model for the JavaScript backend.

Types

EventTarget = ref EventTargetObj
  Source Edit
DomEvent {...}{.pure.} = enum
  Abort = "abort", BeforeInput = "beforeinput", Blur = "blur", Click = "click",
  CompositionEnd = "compositionend", CompositionStart = "compositionstart",
  CompositionUpdate = "compositionupdate", DblClick = "dblclick",
  Error = "error", Focus = "focus", FocusIn = "focusin", FocusOut = "focusout",
  Input = "input", KeyDown = "keydown", KeyPress = "keypress", KeyUp = "keyup",
  Load = "load", MouseDown = "mousedown", MouseEnter = "mouseenter",
  MouseLeave = "mouseleave", MouseMove = "mousemove", MouseOut = "mouseout",
  MouseOver = "mouseover", MouseUp = "mouseup", Resize = "resize",
  Scroll = "scroll", Select = "select", Unload = "unload", Wheel = "wheel"
see docs   Source Edit
PerformanceMemory {...}{.importc.} = ref object
  jsHeapSizeLimit*: float
  totalJSHeapSize*: float
  usedJSHeapSize*: float
  Source Edit
PerformanceTiming {...}{.importc.} = ref object
  connectStart*: float
  domComplete*: float
  domContentLoadedEventEnd*: float
  domContentLoadedEventStart*: float
  domInteractive*: float
  domLoading*: float
  domainLookupEnd*: float
  domainLookupStart*: float
  fetchStart*: float
  loadEventEnd*: float
  loadEventStart*: float
  navigationStart*: float
  redirectEnd*: float
  redirectStart*: float
  requestStart*: float
  responseEnd*: float
  responseStart*: float
  secureConnectionStart*: float
  unloadEventEnd*: float
  unloadEventStart*: float
  Source Edit
Performance {...}{.importc.} = ref object
  memory*: PerformanceMemory
  timing*: PerformanceTiming
  Source Edit
Range {...}{.importc.} = ref object
  collapsed*: bool
  commonAncestorContainer*: Node
  endContainer*: Node
  endOffset*: int
  startContainer*: Node
  startOffset*: int
see docs{https://developer.mozilla.org/en-US/docs/Web/API/Range}   Source Edit
Selection {...}{.importc.} = ref object
  anchorNode*: Node
  anchorOffset*: int
  focusNode*: Node
  focusOffset*: int
  isCollapsed*: bool
  rangeCount*: int
  `type`*: cstring
see docs   Source Edit
LocalStorage {...}{.importc.} = ref object
  Source Edit
Window = ref WindowObj
  Source Edit
Frame = ref FrameObj
  Source Edit
ClassList = ref ClassListObj
  Source Edit
NodeType = enum
  ElementNode = 1, AttributeNode, TextNode, CDATANode, EntityRefNode,
  EntityNode, ProcessingInstructionNode, CommentNode, DocumentNode,
  DocumentTypeNode, DocumentFragmentNode, NotationNode
  Source Edit
Node = ref NodeObj
  Source Edit
Document = ref DocumentObj
  Source Edit
Element = ref ElementObj
  Source Edit
ValidityState = ref ValidityStateObj
see docs   Source Edit
Blob = ref BlobObj
see docs   Source Edit
File = ref FileObj
see docs   Source Edit
TextAreaElement = ref TextAreaElementObj
see docs   Source Edit
InputElement = ref InputElementObj
see docs   Source Edit
LinkElement = ref LinkObj
  Source Edit
EmbedElement = ref EmbedObj
  Source Edit
AnchorElement = ref AnchorObj
  Source Edit
OptionElement = ref OptionObj
  Source Edit
FormElement = ref FormObj
see docs   Source Edit
ImageElement = ref ImageObj
  Source Edit
Style = ref StyleObj
  Source Edit
EventPhase = enum
  None = 0, CapturingPhase, AtTarget, BubblingPhase
  Source Edit
Event = ref EventObj
see docs   Source Edit
UIEvent = ref UIEventObj
see docs   Source Edit
KeyboardEvent = ref KeyboardEventObj
see docs   Source Edit
KeyboardEventKey {...}{.pure.} = enum
  Alt, AltGraph, CapsLock, Control, Fn, FnLock, Hyper, Meta, NumLock,
  ScrollLock, Shift, Super, Symbol, SymbolLock, ArrowDown, ArrowLeft,
  ArrowRight, ArrowUp, End, Home, PageDown, PageUp, Backspace, Clear, Copy,
  CrSel, Cut, Delete, EraseEof, ExSel, Insert, Paste, Redo, Undo, Accept, Again,
  Attn, Cancel, ContextMenu, Escape, Execute, Find, Finish, Help, Pause, Play,
  Props, Select, ZoomIn, ZoomOut, BrigtnessDown, BrigtnessUp, Eject, LogOff,
  Power, PowerOff, PrintScreen, Hibernate, Standby, WakeUp, AllCandidates,
  Alphanumeric, CodeInput, Compose, Convert, Dead, FinalMode, GroupFirst,
  GroupLast, GroupNext, GroupPrevious, ModeChange, NextCandidate, NonConvert,
  PreviousCandidate, Process, SingleCandidate, HangulMode, HanjaMode, JunjaMode,
  Eisu, Hankaku, Hiragana, HiraganaKatakana, KanaMode, KanjiMode, Katakana,
  Romaji, Zenkaku, ZenkakuHanaku, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11,
  F12, F13, F14, F15, F16, F17, F18, F19, F20, Soft1, Soft2, Soft3, Soft4,
  AppSwitch, Call, Camera, CameraFocus, EndCall, GoBack, GoHome, HeadsetHook,
  LastNumberRedial, Notification, MannerMode, VoiceDial, ChannelDown, ChannelUp,
  MediaFastForward, MediaPause, MediaPlay, MediaPlayPause, MediaRecord,
  MediaRewind, MediaStop, MediaTrackNext, MediaTrackPrevious, AudioBalanceLeft,
  AudioBalanceRight, AudioBassDown, AudioBassBoostDown, AudioBassBoostToggle,
  AudioBassBoostUp, AudioBassUp, AudioFaderFront, AudioFaderRear,
  AudioSurroundModeNext, AudioTrebleDown, AudioTrebleUp, AudioVolumeDown,
  AUdioVolumeMute, AudioVolumeUp, MicrophoneToggle, MicrophoneVolumeDown,
  MicrophoneVolumeMute, MicrophoneVolumeUp, TV, TV3DMode, TVAntennaCable,
  TVAudioDescription, TVAudioDescriptionMixDown, TVAudioDescriptionMixUp,
  TVContentsMenu, TVDataService, TVInput, TVInputComponent1, TVInputComponent2,
  TVInputComposite1, TVInputComposite2, TVInputHDMI1, TVInputHDMI2,
  TVInputHDMI3, TVInputHDMI4, TVInputVGA1, TVMediaContext, TVNetwork,
  TVNumberEntry, TVPower, TVRadioService, TVSatellite, TVSatelliteBS,
  TVSatelliteCS, TVSatelliteToggle, TVTerrestrialAnalog, TVTerrestrialDigital,
  TVTimer, AVRInput, AVRPower, ColorF0Red, ColorF1Green, ColorF2Yellow,
  ColorF3Blue, ColorF4Grey, ColorF5Brown, ClosedCaptionToggle, Dimmer,
  DisplaySwap, DVR, Exit, FavoriteClear0, FavoriteClear1, FavoriteClear2,
  FavoriteClear3, FavoriteRecall0, FavoriteRecall1, FavoriteRecall2,
  FavoriteRecall3, FavoriteStore0, FavoriteStore1, FavoriteStore2,
  FavoriteStore3, Guide, GuideNextDay, GuidePreviousDay, Info, InstantReplay,
  Link, ListProgram, LiveContent, Lock, MediaApps, MediaAudioTrack, MediaLast,
  MediaSkipBackward, MediaSkipForward, MediaStepBackward, MediaStepForward,
  MediaTopMenu, NavigateIn, NavigateNext, NavigateOut, NavigatePrevious,
  NextFavoriteChannel, NextUserProfile, OnDemand, Pairing, PinPDown, PinPMove,
  PinPUp, PlaySpeedDown, PlaySpeedReset, PlaySpeedUp, RandomToggle,
  RcLowBattery, RecordSpeedNext, RfBypass, ScanChannelsToggle, ScreenModeNext,
  Settings, SplitScreenToggle, STBInput, STBPower, Subtitle, Teletext,
  VideoModeNext, Wink, ZoomToggle, SpeechCorrectionList, SpeechInputToggle,
  Close, New, Open, Print, Save, SpellCheck, MailForward, MailReply, MailSend,
  LaunchCalculator, LaunchCalendar, LaunchContacts, LaunchMail,
  LaunchMediaPlayer, LaunchMusicPlayer, LaunchMyComputer, LaunchPhone,
  LaunchScreenSaver, LaunchSpreadsheet, LaunchWebBrowser, LaunchWebCam,
  LaunchWordProcessor, LaunchApplication1, LaunchApplication2,
  LaunchApplication3, LaunchApplication4, LaunchApplication5,
  LaunchApplication6, LaunchApplication7, LaunchApplication8,
  LaunchApplication9, LaunchApplication10, LaunchApplication11,
  LaunchApplication12, LaunchApplication13, LaunchApplication14,
  LaunchApplication15, LaunchApplication16, BrowserBack, BrowserFavorites,
  BrowserForward, BrowserHome, BrowserRefresh, BrowserSearch, BrowserStop,
  Key11, Key12, Separator
see docs   Source Edit
MouseButtons = enum
  NoButton = 0, PrimaryButton = 1, SecondaryButton = 2, AuxilaryButton = 4,
  FourthButton = 8, FifthButton = 16
  Source Edit
MouseEvent = ref MouseEventObj
see docs   Source Edit
DataTransferItemKind {...}{.pure.} = enum
  File = "file", String = "string"
  Source Edit
DataTransferItem = ref DataTransferItemObj
see docs   Source Edit
DataTransfer = ref DataTransferObj
see docs   Source Edit
DataTransferDropEffect {...}{.pure.} = enum
  None = "none", Copy = "copy", Link = "link", Move = "move"
  Source Edit
DataTransferEffectAllowed {...}{.pure.} = enum
  None = "none", Copy = "copy", CopyLink = "copyLink", CopyMove = "copyMove",
  Link = "link", LinkMove = "linkMove", Move = "move", All = "all",
  Uninitialized = "uninitialized"
  Source Edit
DragEventTypes = enum
  Drag = "drag", DragEnd = "dragend", DragEnter = "dragenter",
  DragExit = "dragexit", DragLeave = "dragleave", DragOver = "dragover",
  DragStart = "dragstart", Drop = "drop"
  Source Edit
DragEvent {...}{.importc.} = object of MouseEvent
  dataTransfer*: DataTransfer
see docs   Source Edit
ClipboardEvent {...}{.importc.} = object of Event
  clipboardData*: DataTransfer
see docs   Source Edit
TouchList {...}{.importc.} = ref object of RootObj
  length*: int
  Source Edit
Touch = ref TouchObj
  Source Edit
TouchEvent = ref TouchEventObj
  Source Edit
Location = ref LocationObj
  Source Edit
History = ref HistoryObj
  Source Edit
Navigator = ref NavigatorObj
  Source Edit
Plugin {...}{.importc.} = object of RootObj
  description*: cstring
  filename*: cstring
  name*: cstring
  Source Edit
MimeType {...}{.importc.} = object of RootObj
  description*: cstring
  enabledPlugin*: ref Plugin
  suffixes*: seq[cstring]
  `type`*: cstring
  Source Edit
LocationBar {...}{.importc.} = object of RootObj
  visible*: bool
  Source Edit
MenuBar = LocationBar
  Source Edit
PersonalBar = LocationBar
  Source Edit
ScrollBars = LocationBar
  Source Edit
ToolBar = LocationBar
  Source Edit
StatusBar = LocationBar
  Source Edit
TimeOut {...}{.importc.} = ref object of RootObj
  Source Edit
Interval {...}{.importc.} = object of RootObj
  Source Edit
AddEventListenerOptions = object
  capture*: bool
  once*: bool
  passive*: bool
  Source Edit
FontFaceSetReady {...}{.importc.} = ref object
  then*: proc (cb: proc ())
see: docs   Source Edit
FontFaceSet {...}{.importc.} = ref object
  ready*: FontFaceSetReady
  onloadingdone*: proc (event: Event)
see: docs   Source Edit
DomParser = ref object
  
DOM Parser object (defined on browser only, may not be on NodeJS).
let prsr = newDomParser()
discard prsr.parseFromString("<html><marquee>Hello World</marquee></html>".cstring, "text/html".cstring)
  Source Edit
DomException = ref DOMExceptionObj
The DOMException interface represents an abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. Each exception has a name, which is a short "CamelCase" style string identifying the error or abnormal condition. https://developer.mozilla.org/en-US/docs/Web/API/DOMException   Source Edit
FileReader = ref FileReaderObj
The FileReader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. https://developer.mozilla.org/en-US/docs/Web/API/FileReader   Source Edit
FileReaderState = distinct range[0'u16 .. 2'u16]
  Source Edit
RootNodeOptions = object of RootObj
  composed*: bool
  Source Edit
DocumentOrShadowRoot {...}{.importc.} = object of RootObj
  activeElement*: Element
  Source Edit
ShadowRoot = ref ShadowRootObj
  Source Edit
ShadowRootInit = object of RootObj
  mode*: cstring
  delegatesFocus*: bool
  Source Edit
HTMLSlotElement = ref HTMLSlotElementObj
  Source Edit
SlotOptions = object of RootObj
  flatten*: bool
  Source Edit
BoundingRect {...}{.importc.} = object
  top*, bottom*, left*, right*, x*, y*, width*, height*: float
  Source Edit

Consts

DomApiVersion = 3
the version of DOM API we try to follow. No guarantees though.   Source Edit
fileReaderEmpty = 0'u
  Source Edit
fileReaderLoading = 1'u
  Source Edit
fileReaderDone = 2'u
  Source Edit

Procs

proc id(n: Node): cstring {...}{.importcpp: "#.id", nodecl.}
  Source Edit
proc id=(n: Node; x: cstring) {...}{.importcpp: "#.id = #", nodecl.}
  Source Edit
proc class(n: Node): cstring {...}{.importcpp: "#.className", nodecl.}
  Source Edit
proc class=(n: Node; v: cstring) {...}{.importcpp: "#.className = #", nodecl.}
  Source Edit
proc value(n: Node): cstring {...}{.importcpp: "#.value", nodecl.}
  Source Edit
proc value=(n: Node; v: cstring) {...}{.importcpp: "#.value = #", nodecl.}
  Source Edit
proc disabled=(n: Node; v: bool) {...}{.importcpp: "#.disabled = #", nodecl.}
  Source Edit
proc len(x: Node): int {...}{.importcpp: "#.childNodes.length".}
  Source Edit
proc `[]`(x: Node; idx: int): Element {...}{.importcpp: "#.childNodes[#]".}
  Source Edit
proc getElementById(id: cstring): Element {...}{.importc: "document.getElementById",
    nodecl.}
  Source Edit
proc appendChild(n, child: Node) {...}{.importcpp.}
  Source Edit
proc removeChild(n, child: Node) {...}{.importcpp.}
  Source Edit
proc remove(child: Node) {...}{.importcpp.}
  Source Edit
proc replaceChild(n, newNode, oldNode: Node) {...}{.importcpp.}
  Source Edit
proc insertBefore(n, newNode, before: Node) {...}{.importcpp.}
  Source Edit
proc getElementById(d: Document; id: cstring): Element {...}{.importcpp.}
  Source Edit
proc createElement(d: Document; identifier: cstring): Element {...}{.importcpp.}
  Source Edit
proc createTextNode(d: Document; identifier: cstring): Node {...}{.importcpp.}
  Source Edit
proc createComment(d: Document; data: cstring): Node {...}{.importcpp.}
  Source Edit
proc setTimeout(action: proc (); ms: int): TimeOut {...}{.importc, nodecl.}
  Source Edit
proc clearTimeout(t: TimeOut) {...}{.importc, nodecl.}
  Source Edit
proc addEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event);
                      useCapture: bool = false) {...}{.importcpp.}
  Source Edit
proc addEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event);
                      options: AddEventListenerOptions) {...}{.importcpp.}
  Source Edit
proc dispatchEvent(et: EventTarget; ev: Event) {...}{.importcpp.}
  Source Edit
proc removeEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event)) {...}{.
    importcpp.}
  Source Edit
proc alert(w: Window; msg: cstring) {...}{.importcpp.}
  Source Edit
proc back(w: Window) {...}{.importcpp.}
  Source Edit
proc blur(w: Window) {...}{.importcpp.}
  Source Edit
proc clearInterval(w: Window; interval: ref Interval) {...}{.importcpp.}
  Source Edit
proc clearTimeout(w: Window; timeout: ref TimeOut) {...}{.importcpp.}
  Source Edit
proc close(w: Window) {...}{.importcpp.}
  Source Edit
proc confirm(w: Window; msg: cstring): bool {...}{.importcpp.}
  Source Edit
proc disableExternalCapture(w: Window) {...}{.importcpp.}
  Source Edit
proc enableExternalCapture(w: Window) {...}{.importcpp.}
  Source Edit
proc find(w: Window; text: cstring; caseSensitive = false; backwards = false) {...}{.
    importcpp.}
  Source Edit
proc focus(w: Window) {...}{.importcpp.}
  Source Edit
proc forward(w: Window) {...}{.importcpp.}
  Source Edit
proc getComputedStyle(w: Window; e: Node; pe: Node = nil): Style {...}{.importcpp.}
  Source Edit
proc handleEvent(w: Window; e: Event) {...}{.importcpp.}
  Source Edit
proc home(w: Window) {...}{.importcpp.}
  Source Edit
proc moveBy(w: Window; x, y: int) {...}{.importcpp.}
  Source Edit
proc moveTo(w: Window; x, y: int) {...}{.importcpp.}
  Source Edit
proc open(w: Window; uri, windowname: cstring; properties: cstring = nil): Window {...}{.
    importcpp.}
  Source Edit
proc print(w: Window) {...}{.importcpp.}
  Source Edit
proc prompt(w: Window; text, default: cstring): cstring {...}{.importcpp.}
  Source Edit
proc resizeBy(w: Window; x, y: int) {...}{.importcpp.}
  Source Edit
proc resizeTo(w: Window; x, y: int) {...}{.importcpp.}
  Source Edit
proc routeEvent(w: Window; event: Event) {...}{.importcpp.}
  Source Edit
proc scrollBy(w: Window; x, y: int) {...}{.importcpp.}
  Source Edit
proc scrollTo(w: Window; x, y: int) {...}{.importcpp.}
  Source Edit
proc setInterval(w: Window; code: cstring; pause: int): ref Interval {...}{.importcpp.}
  Source Edit
proc setInterval(w: Window; function: proc (); pause: int): ref Interval {...}{.
    importcpp.}
  Source Edit
proc setTimeout(w: Window; code: cstring; pause: int): ref TimeOut {...}{.importcpp.}
  Source Edit
proc setTimeout(w: Window; function: proc (); pause: int): ref Interval {...}{.
    importcpp.}
  Source Edit
proc stop(w: Window) {...}{.importcpp.}
  Source Edit
proc requestAnimationFrame(w: Window; function: proc (time: float)): int {...}{.
    importcpp.}
  Source Edit
proc cancelAnimationFrame(w: Window; id: int) {...}{.importcpp.}
  Source Edit
proc appendData(n: Node; data: cstring) {...}{.importcpp.}
  Source Edit
proc cloneNode(n: Node; copyContent: bool): Node {...}{.importcpp.}
  Source Edit
proc deleteData(n: Node; start, len: int) {...}{.importcpp.}
  Source Edit
proc focus(e: Node) {...}{.importcpp.}
  Source Edit
proc getAttribute(n: Node; attr: cstring): cstring {...}{.importcpp.}
  Source Edit
proc getAttributeNode(n: Node; attr: cstring): Node {...}{.importcpp.}
  Source Edit
proc hasAttribute(n: Node; attr: cstring): bool {...}{.importcpp.}
  Source Edit
proc hasChildNodes(n: Node): bool {...}{.importcpp.}
  Source Edit
proc normalize(n: Node) {...}{.importcpp.}
  Source Edit
proc insertData(n: Node; position: int; data: cstring) {...}{.importcpp.}
  Source Edit
proc removeAttribute(n: Node; attr: cstring) {...}{.importcpp.}
  Source Edit
proc removeAttributeNode(n, attr: Node) {...}{.importcpp.}
  Source Edit
proc replaceData(n: Node; start, len: int; text: cstring) {...}{.importcpp.}
  Source Edit
proc scrollIntoView(n: Node) {...}{.importcpp.}
  Source Edit
proc setAttribute(n: Node; name, value: cstring) {...}{.importcpp.}
  Source Edit
proc setAttributeNode(n: Node; attr: Node) {...}{.importcpp.}
  Source Edit
proc querySelector(n: Node; selectors: cstring): Element {...}{.importcpp.}
  Source Edit
proc querySelectorAll(n: Node; selectors: cstring): seq[Element] {...}{.importcpp.}
  Source Edit
proc compareDocumentPosition(n: Node; otherNode: Node): int {...}{.importcpp.}
  Source Edit
proc lookupPrefix(n: Node): cstring {...}{.importcpp.}
  Source Edit
proc lookupNamespaceURI(n: Node): cstring {...}{.importcpp.}
  Source Edit
proc isDefaultNamespace(n: Node): bool {...}{.importcpp.}
  Source Edit
proc contains(n: Node): bool {...}{.importcpp.}
  Source Edit
proc isEqualNode(n: Node): bool {...}{.importcpp.}
  Source Edit
proc isSameNode(n: Node): bool {...}{.importcpp.}
  Source Edit
proc getRootNode(n: Node; options: RootNodeOptions): Node {...}{.importcpp.}
  Source Edit
proc getSelection(n: DocumentOrShadowRoot): Selection {...}{.importcpp.}
  Source Edit
proc elementFromPoint(n: DocumentOrShadowRoot; x, y: float): Element {...}{.importcpp.}
  Source Edit
proc attachShadow(n: Element): ShadowRoot {...}{.importcpp.}
  Source Edit
proc assignedNodes(n: HTMLSlotElement; options: SlotOptions): seq[Node] {...}{.
    importcpp.}
  Source Edit
proc assignedElements(n: HTMLSlotElement; options: SlotOptions): seq[Element] {...}{.
    importcpp.}
  Source Edit
proc createAttribute(d: Document; identifier: cstring): Node {...}{.importcpp.}
  Source Edit
proc getElementsByName(d: Document; name: cstring): seq[Element] {...}{.importcpp.}
  Source Edit
proc getElementsByTagName(d: Document; name: cstring): seq[Element] {...}{.importcpp.}
  Source Edit
proc getElementsByClassName(d: Document; name: cstring): seq[Element] {...}{.
    importcpp.}
  Source Edit
proc insertNode(range: Range; node: Node) {...}{.importcpp.}
  Source Edit
proc getSelection(d: Document): Selection {...}{.importcpp.}
  Source Edit
proc handleEvent(d: Document; event: Event) {...}{.importcpp.}
  Source Edit
proc open(d: Document) {...}{.importcpp.}
  Source Edit
proc routeEvent(d: Document; event: Event) {...}{.importcpp.}
  Source Edit
proc write(d: Document; text: cstring) {...}{.importcpp.}
  Source Edit
proc writeln(d: Document; text: cstring) {...}{.importcpp.}
  Source Edit
proc querySelector(d: Document; selectors: cstring): Element {...}{.importcpp.}
  Source Edit
proc querySelectorAll(d: Document; selectors: cstring): seq[Element] {...}{.importcpp.}
  Source Edit
proc blur(e: Element) {...}{.importcpp.}
  Source Edit
proc click(e: Element) {...}{.importcpp.}
  Source Edit
proc focus(e: Element) {...}{.importcpp.}
  Source Edit
proc handleEvent(e: Element; event: Event) {...}{.importcpp.}
  Source Edit
proc select(e: Element) {...}{.importcpp.}
  Source Edit
proc getElementsByTagName(e: Element; name: cstring): seq[Element] {...}{.importcpp.}
  Source Edit
proc getElementsByClassName(e: Element; name: cstring): seq[Element] {...}{.importcpp.}
  Source Edit
proc reset(f: FormElement) {...}{.importcpp.}
  Source Edit
proc submit(f: FormElement) {...}{.importcpp.}
  Source Edit
proc checkValidity(e: FormElement): bool {...}{.importcpp.}
  Source Edit
proc reportValidity(e: FormElement): bool {...}{.importcpp.}
  Source Edit
proc play(e: EmbedElement) {...}{.importcpp.}
  Source Edit
proc stop(e: EmbedElement) {...}{.importcpp.}
  Source Edit
proc reload(loc: Location) {...}{.importcpp.}
  Source Edit
proc replace(loc: Location; s: cstring) {...}{.importcpp.}
  Source Edit
proc back(h: History) {...}{.importcpp.}
  Source Edit
proc forward(h: History) {...}{.importcpp.}
  Source Edit
proc go(h: History; pagesToJump: int) {...}{.importcpp.}
  Source Edit
proc pushState[T](h: History; stateObject: T; title, url: cstring) {...}{.importcpp.}
  Source Edit
proc javaEnabled(h: Navigator): bool {...}{.importcpp.}
  Source Edit
proc canShare(self: Navigator; data: cstring): bool {...}{.importcpp.}
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare   Source Edit
proc sendBeacon(self: Navigator; url, data: cstring): bool {...}{.importcpp.}
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon   Source Edit
proc vibrate(self: Navigator; pattern: cint): bool {...}{.importcpp.}
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate   Source Edit
proc vibrate(self: Navigator; pattern: openArray[cint]): bool {...}{.importcpp.}
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate   Source Edit
proc registerProtocolHandler(self: Navigator; scheme, url, title: cstring) {...}{.
    importcpp.}
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler   Source Edit
proc add(c: ClassList; class: cstring) {...}{.importcpp.}
  Source Edit
proc remove(c: ClassList; class: cstring) {...}{.importcpp.}
  Source Edit
proc contains(c: ClassList; class: cstring): bool {...}{.importcpp.}
  Source Edit
proc toggle(c: ClassList; class: cstring) {...}{.importcpp.}
  Source Edit
proc getPropertyValue(s: Style; property: cstring): cstring {...}{.importcpp.}
  Source Edit
proc removeProperty(s: Style; property: cstring) {...}{.importcpp.}
  Source Edit
proc setProperty(s: Style; property, value: cstring; priority = "") {...}{.importcpp.}
  Source Edit
proc getPropertyPriority(s: Style; property: cstring): cstring {...}{.importcpp.}
  Source Edit
proc preventDefault(ev: Event) {...}{.importcpp.}
  Source Edit
proc stopImmediatePropagation(ev: Event) {...}{.importcpp.}
  Source Edit
proc stopPropagation(ev: Event) {...}{.importcpp.}
  Source Edit
proc getModifierState(ev: KeyboardEvent; keyArg: cstring): bool {...}{.importcpp.}
  Source Edit
proc getModifierState(ev: MouseEvent; keyArg: cstring): bool {...}{.importcpp.}
  Source Edit
proc identifiedTouch(list: TouchList): Touch {...}{.importcpp.}
  Source Edit
proc item(list: TouchList; i: int): Touch {...}{.importcpp.}
  Source Edit
proc clearData(dt: DataTransfer; format: cstring) {...}{.importcpp.}
  Source Edit
proc getData(dt: DataTransfer; format: cstring): cstring {...}{.importcpp.}
  Source Edit
proc setData(dt: DataTransfer; format: cstring; data: cstring) {...}{.importcpp.}
  Source Edit
proc setDragImage(dt: DataTransfer; img: Element; xOffset: int64; yOffset: int64) {...}{.
    importcpp.}
  Source Edit
proc getAsFile(dti: DataTransferItem): File {...}{.importcpp.}
  Source Edit
proc setSelectionRange(e: InputElement; selectionStart: int; selectionEnd: int;
                       selectionDirection: cstring = "none") {...}{.importcpp.}
  Source Edit
proc setRangeText(e: InputElement; replacement: cstring; startindex: int = 0;
                  endindex: int = 0; selectionMode: cstring = "preserve") {...}{.
    importcpp.}
  Source Edit
proc setCustomValidity(e: InputElement; error: cstring) {...}{.importcpp.}
  Source Edit
proc checkValidity(e: InputElement): bool {...}{.importcpp.}
  Source Edit
proc slice(e: Blob; startindex: int = 0; endindex: int = e.size;
           contentType: cstring = "") {...}{.importcpp.}
  Source Edit
proc now(p: Performance): float {...}{.importcpp.}
  Source Edit
proc removeAllRanges(s: Selection) {...}{.importcpp.}
  Source Edit
proc deleteFromDocument(s: Selection) {...}{.importcpp.}
  Source Edit
proc getRangeAt(s: Selection; index: int): Range {...}{.importcpp.}
  Source Edit
proc `$`(s: Selection): string {...}{.importcpp.}
  Source Edit
proc getItem(ls: LocalStorage; key: cstring): cstring {...}{.importcpp.}
  Source Edit
proc setItem(ls: LocalStorage; key, value: cstring) {...}{.importcpp.}
  Source Edit
proc hasItem(ls: LocalStorage; key: cstring): bool {...}{.importcpp.}
  Source Edit
proc clear(ls: LocalStorage) {...}{.importcpp.}
  Source Edit
proc removeItem(ls: LocalStorage; key: cstring) {...}{.importcpp.}
  Source Edit
proc setAttr(n: Node; key, val: cstring) {...}{.importcpp: "#.setAttribute(@)".}
  Source Edit
proc decodeURI(uri: cstring): cstring {...}{.importc, nodecl.}
  Source Edit
proc encodeURI(uri: cstring): cstring {...}{.importc, nodecl.}
  Source Edit
proc escape(uri: cstring): cstring {...}{.importc, nodecl.}
  Source Edit
proc unescape(uri: cstring): cstring {...}{.importc, nodecl.}
  Source Edit
proc decodeURIComponent(uri: cstring): cstring {...}{.importc, nodecl.}
  Source Edit
proc encodeURIComponent(uri: cstring): cstring {...}{.importc, nodecl.}
  Source Edit
proc isFinite(x: BiggestFloat): bool {...}{.importc, nodecl.}
  Source Edit
proc isNaN(x: BiggestFloat): bool {...}{.importc, nodecl.}
  Source Edit
proc newEvent(name: cstring): Event {...}{.importcpp: "new Event(@)", constructor.}
  Source Edit
proc getElementsByClass(n: Node; name: cstring): seq[Node] {...}{.
    importcpp: "#.getElementsByClassName(#)", nodecl.}
  Source Edit
proc getBoundingClientRect(e: Node): BoundingRect {...}{.
    importcpp: "getBoundingClientRect", nodecl.}
  Source Edit
proc clientHeight(): int {...}{.importcpp: "(window.innerHeight || document.documentElement.clientHeight)@",
                           nodecl.}
  Source Edit
proc clientWidth(): int {...}{.importcpp: "(window.innerWidth || document.documentElement.clientWidth)@",
                          nodecl.}
  Source Edit
proc inViewport(el: Node): bool {...}{.raises: [], tags: [].}
  Source Edit
proc scrollTop(e: Node): int {...}{.importcpp: "#.scrollTop", nodecl.}
  Source Edit
proc scrollTop=(e: Node; value: int) {...}{.importcpp: "#.scrollTop = #", nodecl.}
  Source Edit
proc scrollLeft(e: Node): int {...}{.importcpp: "#.scrollLeft", nodecl.}
  Source Edit
proc scrollHeight(e: Node): int {...}{.importcpp: "#.scrollHeight", nodecl.}
  Source Edit
proc scrollWidth(e: Node): int {...}{.importcpp: "#.scrollWidth", nodecl.}
  Source Edit
proc offsetHeight(e: Node): int {...}{.importcpp: "#.offsetHeight", nodecl.}
  Source Edit
proc offsetWidth(e: Node): int {...}{.importcpp: "#.offsetWidth", nodecl.}
  Source Edit
proc offsetTop(e: Node): int {...}{.importcpp: "#.offsetTop", nodecl.}
  Source Edit
proc offsetLeft(e: Node): int {...}{.importcpp: "#.offsetLeft", nodecl.}
  Source Edit
proc newDomException(): DomException {...}{.importcpp: "new DomException()",
                                       constructor.}
DOM Exception constructor   Source Edit
proc message(ex: DomException): cstring {...}{.importcpp: "#.message", nodecl.}
https://developer.mozilla.org/en-US/docs/Web/API/DOMException/message   Source Edit
proc name(ex: DomException): cstring {...}{.importcpp: "#.name", nodecl.}
https://developer.mozilla.org/en-US/docs/Web/API/DOMException/name   Source Edit
proc newFileReader(): FileReader {...}{.importcpp: "new FileReader()", constructor.}
File Reader constructor   Source Edit
proc error(f: FileReader): DomException {...}{.importcpp: "#.error", nodecl.}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/error   Source Edit
proc readyState(f: FileReader): FileReaderState {...}{.importcpp: "#.readyState",
    nodecl.}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readyState   Source Edit
proc resultAsString(f: FileReader): cstring {...}{.importcpp: "#.result", nodecl.}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/result   Source Edit
proc abort(f: FileReader) {...}{.importcpp: "#.abort()".}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/abort   Source Edit
proc readAsBinaryString(f: FileReader; b: Blob) {...}{.
    importcpp: "#.readAsBinaryString(#)".}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsBinaryString   Source Edit
proc readAsDataURL(f: FileReader; b: Blob) {...}{.importcpp: "#.readAsDataURL(#)".}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL   Source Edit
proc readAsText(f: FileReader; b: Blob; encoding = cstring"UTF-8") {...}{.
    importcpp: "#.readAsText(#, #)".}
https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsText   Source Edit

Funcs

func newDomParser(): DomParser {...}{.importcpp: "new DOMParser()".}
DOM Parser constructor.   Source Edit
func parseFromString(this: DomParser; str: cstring; mimeType: cstring): Document {...}{.
    importcpp.}
Parse from string to Document.   Source Edit

Converters

converter toString(s: Selection): cstring {...}{.importcpp.}
  Source Edit