dom

    Dark Mode
Search:
Group by:

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
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
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
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

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 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 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 captureEvents(w: Window; eventMask: int) {...}{.deprecated, importcpp.}
Deprecated
  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 releaseEvents(w: Window; eventMask: int) {...}{.deprecated, importcpp.}
Deprecated
  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 hasChildNodes(n: Node): bool {...}{.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 captureEvents(d: Document; eventMask: int) {...}{.deprecated, importcpp.}
Deprecated
  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 getSelection(d: Document): cstring {...}{.importcpp.}
  Source Edit
proc handleEvent(d: Document; event: Event) {...}{.importcpp.}
  Source Edit
proc open(d: Document) {...}{.importcpp.}
  Source Edit
proc releaseEvents(d: Document; eventMask: int) {...}{.deprecated, importcpp.}
Deprecated
  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 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 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