Declaration of the Document Object Model for the JavaScript backend.
Types
AnchorElement = ref AnchorObj
- Source Edit
BoundingRect {.importc.} = object top*, bottom*, left*, right*, x*, y*, width*, height*: float
- Source Edit
ClipboardEvent {.importc.} = object of Event clipboardData*: DataTransfer
- 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
DataTransferItem = ref DataTransferItemObj
- see docs Source Edit
DataTransferItemKind {.pure.} = enum File = "file", String = "string"
- Source Edit
DocumentOrShadowRoot {.importc.} = object of RootObj activeElement*: Element
- 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", Storage = "storage", Unload = "unload", Wheel = "wheel"
- see docs 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
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 DragEvent {.importc.} = object of MouseEvent dataTransfer*: DataTransfer
- see docs Source Edit
DragEventTypes = enum Drag = "drag", DragEnd = "dragend", DragEnter = "dragenter", DragExit = "dragexit", DragLeave = "dragleave", DragOver = "dragover", DragStart = "dragstart", Drop = "drop"
- Source Edit
EmbedElement = ref EmbedObj
- Source Edit
EventPhase = enum None = 0, CapturingPhase, AtTarget, BubblingPhase
- Source Edit
EventTarget = ref EventTargetObj
- 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
FontFaceSet {.importc.} = ref object ready*: FontFaceSetReady onloadingdone*: proc (event: Event)
- see: docs Source Edit
FontFaceSetReady {.importc.} = ref object then*: proc (cb: proc ())
- see: docs Source Edit
FormElement = ref FormObj
- see docs Source Edit
HTMLSlotElement = ref HTMLSlotElementObj
- Source Edit
ImageElement = ref ImageObj
- Source Edit
InputElement = ref InputElementObj
- 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
LinkElement = ref LinkObj
- Source Edit
LocationBar {.importc.} = object of RootObj visible*: bool
- Source Edit
MimeType {.importc.} = object of RootObj description*: cstring enabledPlugin*: ref Plugin suffixes*: seq[cstring] `type`*: cstring
- 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
NodeType = enum ElementNode = 1, AttributeNode, TextNode, CDATANode, EntityRefNode, EntityNode, ProcessingInstructionNode, CommentNode, DocumentNode, DocumentTypeNode, DocumentFragmentNode, NotationNode
- Source Edit
OptionElement = ref OptionObj
- Source Edit
Performance {.importc.} = ref object memory*: PerformanceMemory timing*: PerformanceTiming
- 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
Plugin {.importc.} = object of RootObj description*: cstring filename*: cstring name*: cstring
- Source Edit
Range {.importc.} = ref object collapsed*: bool commonAncestorContainer*: Node endContainer*: Node endOffset*: int startContainer*: Node startOffset*: int
- see docs Source Edit
RootNodeOptions = object of RootObj composed*: bool
- Source Edit
Selection {.importc.} = ref object anchorNode*: Node anchorOffset*: int focusNode*: Node focusOffset*: int isCollapsed*: bool rangeCount*: int `type`*: cstring
- see docs Source Edit
ShadowRoot = ref ShadowRootObj
- Source Edit
SlotOptions = object of RootObj flatten*: bool
- Source Edit
StorageEvent = ref StorageEventObj
- see docs Source Edit
TextAreaElement = ref TextAreaElementObj
- see docs Source Edit
TouchEvent = ref TouchEventObj
- Source Edit
ValidityState = ref ValidityStateObj
- see docs Source Edit
Consts
DomApiVersion = 3
- the version of DOM API we try to follow. No guarantees though. Source Edit
fileReaderDone = 2'u16
- Source Edit
fileReaderEmpty = 0'u16
- Source Edit
fileReaderLoading = 1'u16
- Source Edit
Procs
proc `[]`(x: Node; idx: int): Element {.importjs: "#.childNodes[#]", ...raises: [], tags: [].}
- Source Edit
proc abort(f: FileReader) {.importjs: "#.abort()", ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/abort Source Edit
proc addEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event); options: AddEventListenerOptions) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc addEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event); useCapture: bool = false) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc appendChild(n, child: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc appendData(n: Node; data: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc assignedElements(n: HTMLSlotElement; options: SlotOptions): seq[Element] {. importjs, ...raises: [], tags: [].}
- Source Edit
proc assignedNodes(n: HTMLSlotElement; options: SlotOptions): seq[Node] {. importjs, ...raises: [], tags: [].}
- Source Edit
proc attachShadow(n: Element): ShadowRoot {.importjs, ...raises: [], tags: [].}
- Source Edit
proc cancelAnimationFrame(w: Window; id: int) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc checked=(n: Node; v: bool) {.importjs: "#.checked = #", nodecl, ...raises: [], tags: [].}
- Source Edit
proc checkValidity(e: FormElement): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc checkValidity(e: InputElement): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc class(n: Node): cstring {.importjs: "#.className", nodecl, ...raises: [], tags: [].}
- Source Edit
proc class=(n: Node; v: cstring) {.importjs: "#.className = #", nodecl, ...raises: [], tags: [].}
- Source Edit
proc clearData(dt: DataTransfer; format: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc clearInterval(i: Interval) {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc clearInterval(w: Window; interval: Interval) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc clearTimeout(t: TimeOut) {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc clearTimeout(w: Window; timeout: TimeOut) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc clientHeight(): int {.importjs: "(window.innerHeight || document.documentElement.clientHeight)@", nodecl, ...raises: [], tags: [].}
- Source Edit
proc clientWidth(): int {.importjs: "(window.innerWidth || document.documentElement.clientWidth)@", nodecl, ...raises: [], tags: [].}
- Source Edit
proc compareDocumentPosition(n: Node; otherNode: Node): int {.importjs, ...raises: [], tags: [].}
- Source Edit
proc createAttribute(d: Document; identifier: cstring): Node {.importjs, ...raises: [], tags: [].}
- Source Edit
proc createComment(d: Document; data: cstring): Node {.importjs, ...raises: [], tags: [].}
- Source Edit
proc createElement(d: Document; identifier: cstring): Element {.importjs, ...raises: [], tags: [].}
- Source Edit
proc createElementNS(d: Document; namespaceURI, qualifiedIdentifier: cstring): Element {. importjs, ...raises: [], tags: [].}
- Source Edit
proc createTextNode(d: Document; identifier: cstring): Node {.importjs, ...raises: [], tags: [].}
- Source Edit
proc decodeURIComponent(uri: cstring): cstring {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc deleteData(n: Node; start, len: int) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc deleteFromDocument(s: Selection) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc disabled=(n: Node; v: bool) {.importjs: "#.disabled = #", nodecl, ...raises: [], tags: [].}
- Source Edit
proc disableExternalCapture(w: Window) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc dispatchEvent(et: EventTarget; ev: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc elementFromPoint(n: DocumentOrShadowRoot; x, y: float): Element {.importjs, ...raises: [], tags: [].}
- Source Edit
proc elementsFromPoint(n: DocumentOrShadowRoot; x, y: float): seq[Element] {. importjs, ...raises: [], tags: [].}
- Source Edit
proc enableExternalCapture(w: Window) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc encodeURIComponent(uri: cstring): cstring {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc error(f: FileReader): DomException {.importjs: "#.error", nodecl, ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/error Source Edit
proc find(w: Window; text: cstring; caseSensitive = false; backwards = false) {. importjs, ...raises: [], tags: [].}
- Source Edit
proc getAsFile(dti: DataTransferItem): File {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getAttribute(n: Node; attr: cstring): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getAttributeNode(n: Node; attr: cstring): Node {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getBoundingClientRect(e: Node): BoundingRect {. importjs: "getBoundingClientRect", nodecl, ...raises: [], tags: [].}
- Source Edit
proc getComputedStyle(w: Window; e: Node; pe: Node = nil): Style {.importjs, ...raises: [], tags: [].}
-
Warning: The returned Style may or may not be read-only at run-time in the browser. getComputedStyle is performance costly.Source Edit
proc getData(dt: DataTransfer; format: cstring): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getElementById(d: Document; id: cstring): Element {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getElementById(id: cstring): Element {.importc: "document.getElementById", nodecl, ...raises: [], tags: [].}
- Source Edit
proc getElementsByClass(n: Node; name: cstring): seq[Node] {. importjs: "#.getElementsByClassName(#)", nodecl, ...raises: [], tags: [].}
- Source Edit
proc getElementsByClassName(d: Document; name: cstring): seq[Element] {. importjs, ...raises: [], tags: [].}
- Source Edit
proc getElementsByClassName(e: Element; name: cstring): seq[Element] {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getElementsByName(d: Document; name: cstring): seq[Element] {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getElementsByTagName(d: Document; name: cstring): seq[Element] {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getElementsByTagName(e: Element; name: cstring): seq[Element] {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getModifierState(ev: KeyboardEvent; keyArg: cstring): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getModifierState(ev: MouseEvent; keyArg: cstring): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getPropertyPriority(s: Style; property: cstring): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getPropertyValue(s: Style; property: cstring): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getRootNode(n: Node; options: RootNodeOptions): Node {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getSelection(d: Document): Selection {.importjs, ...raises: [], tags: [].}
- Source Edit
proc getSelection(n: DocumentOrShadowRoot): Selection {.importjs, ...raises: [], tags: [].}
- Source Edit
proc handleEvent(d: Document; event: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc handleEvent(e: Element; event: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc handleEvent(w: Window; e: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc hasChildNodes(n: Node): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc identifiedTouch(list: TouchList): Touch {.importjs, ...raises: [], tags: [].}
- Source Edit
proc insertBefore(n, newNode, before: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc insertData(n: Node; position: int; data: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc insertNode(range: Range; node: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc inViewport(el: Node): bool {....raises: [], tags: [].}
- Source Edit
proc isDefaultNamespace(n: Node): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc isEqualNode(n: Node): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc isFinite(x: BiggestFloat): bool {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc isNaN(x: BiggestFloat): bool {.importc, nodecl, ...raises: [], tags: [].}
- see also math.isNaN. Source Edit
proc isSameNode(n: Node): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc lookupNamespaceURI(n: Node): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc lookupPrefix(n: Node): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc message(ex: DomException): cstring {.importjs: "#.message", nodecl, ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/DOMException/message Source Edit
proc name(ex: DomException): cstring {.importjs: "#.name", nodecl, ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/DOMException/name Source Edit
proc newDomException(): DomException {.importjs: "new DomException()", ...raises: [], tags: [].}
- DOM Exception constructor Source Edit
func newDomParser(): DomParser {.importjs: "new DOMParser()", ...raises: [], tags: [].}
- DOM Parser constructor. Source Edit
proc newEvent(name: cstring): Event {.importjs: "new Event(@)", ...raises: [], tags: [].}
- Source Edit
proc newFileReader(): FileReader {.importjs: "new FileReader()", ...raises: [], tags: [].}
- File Reader constructor Source Edit
proc now(p: Performance): float {.importjs, ...raises: [], tags: [].}
- Source Edit
proc offsetHeight(e: Node): int {.importjs: "#.offsetHeight", nodecl, ...raises: [], tags: [].}
- Source Edit
proc offsetLeft(e: Node): int {.importjs: "#.offsetLeft", nodecl, ...raises: [], tags: [].}
- Source Edit
proc offsetTop(e: Node): int {.importjs: "#.offsetTop", nodecl, ...raises: [], tags: [].}
- Source Edit
proc offsetWidth(e: Node): int {.importjs: "#.offsetWidth", nodecl, ...raises: [], tags: [].}
- Source Edit
proc open(w: Window; uri, windowname: cstring; properties: cstring = nil): Window {. importjs, ...raises: [], tags: [].}
- Source Edit
func parseFromString(this: DomParser; str: cstring; mimeType: cstring): Document {. importjs, ...raises: [], tags: [].}
- Parse from string to Document. Source Edit
proc play(e: EmbedElement) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc preventDefault(ev: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc prompt(w: Window; text, default: cstring): cstring {.importjs, ...raises: [], tags: [].}
- Source Edit
proc pushState[T](h: History; stateObject: T; title, url: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc querySelector(d: Document; selectors: cstring): Element {.importjs, ...raises: [], tags: [].}
- Source Edit
proc querySelector(n: Node; selectors: cstring): Element {.importjs, ...raises: [], tags: [].}
- Source Edit
proc querySelectorAll(d: Document; selectors: cstring): seq[Element] {.importjs, ...raises: [], tags: [].}
- Source Edit
proc querySelectorAll(n: Node; selectors: cstring): seq[Element] {.importjs, ...raises: [], tags: [].}
- Source Edit
proc readAsBinaryString(f: FileReader; b: Blob) {. importjs: "#.readAsBinaryString(#)", ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsBinaryString Source Edit
proc readAsDataURL(f: FileReader; b: Blob) {.importjs: "#.readAsDataURL(#)", ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL Source Edit
proc readAsText(f: FileReader; b: Blob | File; encoding = cstring"UTF-8") {. importjs: "#.readAsText(#, #)", ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsText Source Edit
proc readyState(f: FileReader): FileReaderState {.importjs: "#.readyState", nodecl, ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readyState Source Edit
proc removeAllRanges(s: Selection) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc removeAttribute(n: Node; attr: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc removeAttributeNode(n, attr: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc removeChild(n, child: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc removeEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event)) {. importjs, ...raises: [], tags: [].}
- Source Edit
proc removeItem(s: Storage; key: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc removeProperty(s: Style; property: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc replaceChild(n, newNode, oldNode: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc replaceData(n: Node; start, len: int; text: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc reportValidity(e: FormElement): bool {.importjs, ...raises: [], tags: [].}
- Source Edit
proc requestAnimationFrame(w: Window; function: proc (time: float)): int {. importjs, ...raises: [], tags: [].}
- Source Edit
proc reset(f: FormElement) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc resultAsString(f: FileReader): cstring {.importjs: "#.result", nodecl, ...raises: [], tags: [].}
- https://developer.mozilla.org/en-US/docs/Web/API/FileReader/result Source Edit
proc routeEvent(d: Document; event: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc routeEvent(w: Window; event: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc scrollHeight(e: Node): int {.importjs: "#.scrollHeight", nodecl, ...raises: [], tags: [].}
- Source Edit
proc scrollIntoView(n: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc scrollIntoView(n: Node; options: ScrollIntoViewOptions) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc scrollLeft(e: Node): int {.importjs: "#.scrollLeft", nodecl, ...raises: [], tags: [].}
- Source Edit
proc scrollTop(e: Node): int {.importjs: "#.scrollTop", nodecl, ...raises: [], tags: [].}
- Source Edit
proc scrollTop=(e: Node; value: int) {.importjs: "#.scrollTop = #", nodecl, ...raises: [], tags: [].}
- Source Edit
proc scrollWidth(e: Node): int {.importjs: "#.scrollWidth", nodecl, ...raises: [], tags: [].}
- Source Edit
proc setAttr(n: Node; key, val: cstring) {.importjs: "#.setAttribute(@)", ...raises: [], tags: [].}
- Source Edit
proc setAttribute(n: Node; name, value: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setAttributeNode(n: Node; attr: Node) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setCustomValidity(e: InputElement; error: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setData(dt: DataTransfer; format: cstring; data: cstring) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setDragImage(dt: DataTransfer; img: Element; xOffset: int64; yOffset: int64) {. importjs, ...raises: [], tags: [].}
- Source Edit
proc setInterval(action: proc (); ms: int): Interval {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc setInterval(w: Window; code: cstring; pause: int): Interval {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setInterval(w: Window; function: proc (); pause: int): Interval {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setProperty(s: Style; property, value: cstring; priority = "") {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setRangeText(e: InputElement; replacement: cstring; startindex: int = 0; endindex: int = 0; selectionMode: cstring = "preserve") {. importjs, ...raises: [], tags: [].}
- Source Edit
proc setSelectionRange(e: InputElement; selectionStart: int; selectionEnd: int; selectionDirection: cstring = "none") {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setTimeout(action: proc (); ms: int): TimeOut {.importc, nodecl, ...raises: [], tags: [].}
- Source Edit
proc setTimeout(w: Window; code: cstring; pause: int): TimeOut {.importjs, ...raises: [], tags: [].}
- Source Edit
proc setTimeout(w: Window; function: proc (); pause: int): Interval {.importjs, ...raises: [], tags: [].}
- Source Edit
proc slice(e: Blob; startindex: int = 0; endindex: int = e.size; contentType: cstring = "") {.importjs, ...raises: [], tags: [].}
- Source Edit
proc stop(e: EmbedElement) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc stopImmediatePropagation(ev: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc stopPropagation(ev: Event) {.importjs, ...raises: [], tags: [].}
- Source Edit
proc submit(f: FormElement) {.importjs, ...raises: [], tags: [].}
- Source Edit