Source Edit

Declaration of the Document Object Model for the JavaScript backend.

Document Ready

  • Basic example of a document ready:

Example: cmd: -b:js -r:off

  1. import std/dom
  2. proc example(e: Event) = echo "Document is ready"
  3. document.addEventListener("DOMContentLoaded", example) # You can also use "load" event.
  • This example runs 5 seconds after the document ready:

Example: cmd: -b:js -r:off

  1. import std/dom
  2. proc example() = echo "5 seconds after document ready"
  3. proc domReady(e: Event) = discard setTimeout(example, 5_000) # Document is ready.
  4. document.addEventListener("DOMContentLoaded", domReady)

Document onUnload

  • Simple example of how to implement code that runs when the page unloads:

Example: cmd: -b:js -r:off

  1. import std/dom
  2. proc example(e: Event) = echo "Document is unloaded"
  3. document.addEventListener("unload", example) # You can also use "beforeunload".

Document Autorefresh

  • Minimal example of a document autorefresh:

Example: cmd: -b:js -r:off

  1. import std/dom
  2. proc example() = window.location.reload()
  3. discard setTimeout(example, 5_000)

Imports

since

Types

  1. AddEventListenerOptions = object
  2. capture*: bool
  3. once*: bool
  4. passive*: bool

Source Edit

  1. AnchorElement {.importc.} = ref object of Element
  2. text*: cstring
  3. x*, y*: int

Source Edit

  1. Blob {.importc.} = ref object of RootObj
  2. size*: int

see docs Source Edit

  1. BoundingRect {.importc.} = object
  2. top*, bottom*, left*, right*, x*, y*, width*, height*: float

Source Edit

  1. ClassList {.importc.} = ref object of RootObj

Source Edit

  1. ClipboardEvent {.importc.} = object of Event
  2. clipboardData*: DataTransfer

see docs Source Edit

  1. DataTransfer {.importc.} = ref object of RootObj
  2. dropEffect*: cstring
  3. effectAllowed*: cstring
  4. files*: seq[Element]
  5. items*: seq[DataTransferItem]
  6. types*: seq[cstring]

see docs Source Edit

  1. DataTransferDropEffect {.pure.} = enum
  2. None = "none", Copy = "copy", Link = "link", Move = "move"

Source Edit

  1. DataTransferEffectAllowed {.pure.} = enum
  2. None = "none", Copy = "copy", CopyLink = "copyLink", CopyMove = "copyMove",
  3. Link = "link", LinkMove = "linkMove", Move = "move", All = "all",
  4. Uninitialized = "uninitialized"

Source Edit

  1. DataTransferItem {.importc.} = ref object of RootObj
  2. kind*: cstring

see docs Source Edit

  1. DataTransferItemKind {.pure.} = enum
  2. File = "file", String = "string"

Source Edit

  1. Document {.importc.} = ref object of Node
  2. activeElement*: Element
  3. documentElement*: Element
  4. alinkColor*: cstring
  5. bgColor*: cstring
  6. body*: Element
  7. charset*: cstring
  8. cookie*: cstring
  9. defaultCharset*: cstring
  10. fgColor*: cstring
  11. head*: Element
  12. hidden*: bool
  13. lastModified*: cstring
  14. linkColor*: cstring
  15. referrer*: cstring
  16. title*: cstring
  17. URL*: cstring
  18. visibilityState*: cstring
  19. vlinkColor*: cstring
  20. anchors*: seq[AnchorElement]
  21. forms*: seq[FormElement]
  22. images*: seq[ImageElement]
  23. applets*: seq[Element]
  24. embeds*: seq[EmbedElement]
  25. links*: seq[LinkElement]
  26. fonts*: FontFaceSet

Source Edit

  1. DocumentOrShadowRoot {.importc.} = object of RootObj
  2. activeElement*: Element

Source Edit

  1. DomEvent {.pure.} = enum
  2. Abort = "abort", BeforeInput = "beforeinput", Blur = "blur", Click = "click",
  3. CompositionEnd = "compositionend", CompositionStart = "compositionstart",
  4. CompositionUpdate = "compositionupdate", DblClick = "dblclick",
  5. Error = "error", Focus = "focus", FocusIn = "focusin", FocusOut = "focusout",
  6. Input = "input", KeyDown = "keydown", KeyPress = "keypress", KeyUp = "keyup",
  7. Load = "load", MouseDown = "mousedown", MouseEnter = "mouseenter",
  8. MouseLeave = "mouseleave", MouseMove = "mousemove", MouseOut = "mouseout",
  9. MouseOver = "mouseover", MouseUp = "mouseup", Resize = "resize",
  10. Scroll = "scroll", Select = "select", Storage = "storage", Unload = "unload",
  11. Wheel = "wheel"

see docs Source Edit

  1. DomException {.importc.} = ref object

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

  1. DomParser = ref object

DOM Parser object (defined on browser only, may not be on NodeJS).

Source Edit

  1. DragEvent {.importc.} = object of MouseEvent
  2. dataTransfer*: DataTransfer

see docs Source Edit

  1. DragEventTypes = enum
  2. Drag = "drag", DragEnd = "dragend", DragEnter = "dragenter",
  3. DragExit = "dragexit", DragLeave = "dragleave", DragOver = "dragover",
  4. DragStart = "dragstart", Drop = "drop"

Source Edit

  1. Element {.importc.} = ref object of Node
  2. className*: cstring
  3. classList*: ClassList
  4. checked*: bool
  5. defaultChecked*: bool
  6. defaultValue*: cstring
  7. disabled*: bool
  8. form*: FormElement
  9. name*: cstring
  10. readOnly*: bool
  11. options*: seq[OptionElement]
  12. selectedOptions*: seq[OptionElement]
  13. clientWidth*, clientHeight*: int
  14. contentEditable*: cstring
  15. isContentEditable*: bool
  16. dir*: cstring
  17. offsetHeight*: int
  18. offsetWidth*: int
  19. offsetLeft*: int
  20. offsetTop*: int

Source Edit

  1. EmbedElement {.importc.} = ref object of Element
  2. height*: int
  3. hspace*: int
  4. src*: cstring
  5. width*: int
  6. vspace*: int

Source Edit

  1. Event {.importc.} = ref object of RootObj
  2. bubbles*: bool
  3. cancelBubble*: bool
  4. cancelable*: bool
  5. composed*: bool
  6. currentTarget*: Node
  7. defaultPrevented*: bool
  8. eventPhase*: int
  9. target*: Node
  10. isTrusted*: bool

see docs Source Edit

  1. EventPhase = enum
  2. None = 0, CapturingPhase, AtTarget, BubblingPhase

Source Edit

  1. EventTarget {.importc.} = ref object of RootObj
  2. onabort*: proc (event: Event) {.closure.}
  3. onblur*: proc (event: Event) {.closure.}
  4. onchange*: proc (event: Event) {.closure.}
  5. onclick*: proc (event: Event) {.closure.}
  6. ondblclick*: proc (event: Event) {.closure.}
  7. onerror*: proc (event: Event) {.closure.}
  8. onfocus*: proc (event: Event) {.closure.}
  9. onkeydown*: proc (event: Event) {.closure.}
  10. onkeypress*: proc (event: Event) {.closure.}
  11. onkeyup*: proc (event: Event) {.closure.}
  12. onload*: proc (event: Event) {.closure.}
  13. onmousedown*: proc (event: Event) {.closure.}
  14. onmousemove*: proc (event: Event) {.closure.}
  15. onmouseout*: proc (event: Event) {.closure.}
  16. onmouseover*: proc (event: Event) {.closure.}
  17. onmouseup*: proc (event: Event) {.closure.}
  18. onreset*: proc (event: Event) {.closure.}
  19. onselect*: proc (event: Event) {.closure.}
  20. onstorage*: proc (event: Event) {.closure.}
  21. onsubmit*: proc (event: Event) {.closure.}
  22. onunload*: proc (event: Event) {.closure.}
  23. onloadstart*: proc (event: Event) {.closure.}
  24. onprogress*: proc (event: Event) {.closure.}
  25. onloadend*: proc (event: Event) {.closure.}

Source Edit

  1. File {.importc.} = ref object of Blob
  2. lastModified*: int
  3. name*: cstring

see docs Source Edit

  1. FileReader {.importc.} = ref object of EventTarget

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

  1. FileReaderState = distinct range[0'u16 .. 2'u16]

Source Edit

  1. FontFaceSet {.importc.} = ref object
  2. ready*: FontFaceSetReady
  3. onloadingdone*: proc (event: Event)

see: docs Source Edit

  1. FontFaceSetReady {.importc.} = ref object
  2. then*: proc (cb: proc ())

see: docs Source Edit

  1. FormElement {.importc.} = ref object of Element
  2. acceptCharset*: cstring
  3. action*: cstring
  4. autocomplete*: cstring
  5. elements*: seq[Element]
  6. encoding*: cstring
  7. enctype*: cstring
  8. length*: int
  9. noValidate*: bool
  10. target*: cstring

see docs Source Edit

  1. Frame {.importc.} = ref object of Window

Source Edit

  1. History {.importc.} = ref object of RootObj
  2. length*: int

Source Edit

  1. HTMLSlotElement {.importc.} = ref object of RootObj
  2. name*: cstring

Source Edit

  1. ImageElement {.importc.} = ref object of Element
  2. border*: int
  3. complete*: bool
  4. height*: int
  5. hspace*: int
  6. lowsrc*: cstring
  7. src*: cstring
  8. vspace*: int
  9. width*: int

Source Edit

  1. InputElement {.importc.} = ref object of Element
  2. formAction*: cstring
  3. formEncType*: cstring
  4. formMethod*: cstring
  5. formNoValidate*: bool
  6. formTarget*: cstring
  7. autofocus*: bool
  8. required*: bool
  9. value*: cstring
  10. validity*: ValidityState
  11. validationMessage*: cstring
  12. willValidate*: bool
  13. indeterminate*: bool
  14. alt*: cstring
  15. height*: cstring
  16. src*: cstring
  17. width*: cstring
  18. accept*: cstring
  19. files*: seq[Blob]
  20. autocomplete*: cstring
  21. maxLength*: int
  22. size*: int
  23. pattern*: cstring
  24. placeholder*: cstring
  25. min*: cstring
  26. max*: cstring
  27. selectionStart*: int
  28. selectionEnd*: int
  29. selectionDirection*: cstring
  30. dirName*: cstring
  31. accessKey*: cstring
  32. list*: Element
  33. multiple*: bool
  34. labels*: seq[Element]
  35. step*: cstring
  36. valueAsDate*: cstring
  37. valueAsNumber*: float

see docs Source Edit

  1. Interval {.importc.} = ref object of RootObj

Source Edit

  1. KeyboardEvent {.importc.} = ref object of UIEvent
  2. altKey*, ctrlKey*, metaKey*, shiftKey*: bool
  3. code*: cstring
  4. isComposing*: bool
  5. key*: cstring
  6. keyCode*: int
  7. location*: int

see docs Source Edit

  1. KeyboardEventKey {.pure.} = enum
  2. Alt, AltGraph, CapsLock, Control, Fn, FnLock, Hyper, Meta, NumLock,
  3. ScrollLock, Shift, Super, Symbol, SymbolLock, ArrowDown, ArrowLeft,
  4. ArrowRight, ArrowUp, End, Home, PageDown, PageUp, Backspace, Clear, Copy,
  5. CrSel, Cut, Delete, EraseEof, ExSel, Insert, Paste, Redo, Undo, Accept, Again,
  6. Attn, Cancel, ContextMenu, Escape, Execute, Find, Finish, Help, Pause, Play,
  7. Props, Select, ZoomIn, ZoomOut, BrigtnessDown, BrigtnessUp, Eject, LogOff,
  8. Power, PowerOff, PrintScreen, Hibernate, Standby, WakeUp, AllCandidates,
  9. Alphanumeric, CodeInput, Compose, Convert, Dead, FinalMode, GroupFirst,
  10. GroupLast, GroupNext, GroupPrevious, ModeChange, NextCandidate, NonConvert,
  11. PreviousCandidate, Process, SingleCandidate, HangulMode, HanjaMode, JunjaMode,
  12. Eisu, Hankaku, Hiragana, HiraganaKatakana, KanaMode, KanjiMode, Katakana,
  13. Romaji, Zenkaku, ZenkakuHanaku, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11,
  14. F12, F13, F14, F15, F16, F17, F18, F19, F20, Soft1, Soft2, Soft3, Soft4,
  15. AppSwitch, Call, Camera, CameraFocus, EndCall, GoBack, GoHome, HeadsetHook,
  16. LastNumberRedial, Notification, MannerMode, VoiceDial, ChannelDown, ChannelUp,
  17. MediaFastForward, MediaPause, MediaPlay, MediaPlayPause, MediaRecord,
  18. MediaRewind, MediaStop, MediaTrackNext, MediaTrackPrevious, AudioBalanceLeft,
  19. AudioBalanceRight, AudioBassDown, AudioBassBoostDown, AudioBassBoostToggle,
  20. AudioBassBoostUp, AudioBassUp, AudioFaderFront, AudioFaderRear,
  21. AudioSurroundModeNext, AudioTrebleDown, AudioTrebleUp, AudioVolumeDown,
  22. AUdioVolumeMute, AudioVolumeUp, MicrophoneToggle, MicrophoneVolumeDown,
  23. MicrophoneVolumeMute, MicrophoneVolumeUp, TV, TV3DMode, TVAntennaCable,
  24. TVAudioDescription, TVAudioDescriptionMixDown, TVAudioDescriptionMixUp,
  25. TVContentsMenu, TVDataService, TVInput, TVInputComponent1, TVInputComponent2,
  26. TVInputComposite1, TVInputComposite2, TVInputHDMI1, TVInputHDMI2,
  27. TVInputHDMI3, TVInputHDMI4, TVInputVGA1, TVMediaContext, TVNetwork,
  28. TVNumberEntry, TVPower, TVRadioService, TVSatellite, TVSatelliteBS,
  29. TVSatelliteCS, TVSatelliteToggle, TVTerrestrialAnalog, TVTerrestrialDigital,
  30. TVTimer, AVRInput, AVRPower, ColorF0Red, ColorF1Green, ColorF2Yellow,
  31. ColorF3Blue, ColorF4Grey, ColorF5Brown, ClosedCaptionToggle, Dimmer,
  32. DisplaySwap, DVR, Exit, FavoriteClear0, FavoriteClear1, FavoriteClear2,
  33. FavoriteClear3, FavoriteRecall0, FavoriteRecall1, FavoriteRecall2,
  34. FavoriteRecall3, FavoriteStore0, FavoriteStore1, FavoriteStore2,
  35. FavoriteStore3, Guide, GuideNextDay, GuidePreviousDay, Info, InstantReplay,
  36. Link, ListProgram, LiveContent, Lock, MediaApps, MediaAudioTrack, MediaLast,
  37. MediaSkipBackward, MediaSkipForward, MediaStepBackward, MediaStepForward,
  38. MediaTopMenu, NavigateIn, NavigateNext, NavigateOut, NavigatePrevious,
  39. NextFavoriteChannel, NextUserProfile, OnDemand, Pairing, PinPDown, PinPMove,
  40. PinPUp, PlaySpeedDown, PlaySpeedReset, PlaySpeedUp, RandomToggle,
  41. RcLowBattery, RecordSpeedNext, RfBypass, ScanChannelsToggle, ScreenModeNext,
  42. Settings, SplitScreenToggle, STBInput, STBPower, Subtitle, Teletext,
  43. VideoModeNext, Wink, ZoomToggle, SpeechCorrectionList, SpeechInputToggle,
  44. Close, New, Open, Print, Save, SpellCheck, MailForward, MailReply, MailSend,
  45. LaunchCalculator, LaunchCalendar, LaunchContacts, LaunchMail,
  46. LaunchMediaPlayer, LaunchMusicPlayer, LaunchMyComputer, LaunchPhone,
  47. LaunchScreenSaver, LaunchSpreadsheet, LaunchWebBrowser, LaunchWebCam,
  48. LaunchWordProcessor, LaunchApplication1, LaunchApplication2,
  49. LaunchApplication3, LaunchApplication4, LaunchApplication5,
  50. LaunchApplication6, LaunchApplication7, LaunchApplication8,
  51. LaunchApplication9, LaunchApplication10, LaunchApplication11,
  52. LaunchApplication12, LaunchApplication13, LaunchApplication14,
  53. LaunchApplication15, LaunchApplication16, BrowserBack, BrowserFavorites,
  54. BrowserForward, BrowserHome, BrowserRefresh, BrowserSearch, BrowserStop,
  55. Key11, Key12, Separator

see docs Source Edit

  1. LinkElement {.importc.} = ref object of Element
  2. target*: cstring
  3. text*: cstring
  4. x*: int
  5. y*: int

Source Edit

  1. Location {.importc.} = ref object of RootObj
  2. hash*: cstring
  3. host*: cstring
  4. hostname*: cstring
  5. href*: cstring
  6. pathname*: cstring
  7. port*: cstring
  8. protocol*: cstring
  9. search*: cstring
  10. origin*: cstring

Source Edit

  1. LocationBar {.importc.} = object of RootObj
  2. visible*: bool

Source Edit

  1. MediaQueryList {.importc.} = ref object of EventTarget
  2. matches*: bool
  3. media*: cstring

Source Edit

  1. MenuBar = LocationBar

Source Edit

  1. MimeType {.importc.} = object of RootObj
  2. description*: cstring
  3. enabledPlugin*: ref Plugin
  4. suffixes*: seq[cstring]

Source Edit

  1. MouseButtons = enum
  2. NoButton = 0, PrimaryButton = 1, SecondaryButton = 2, AuxilaryButton = 4,
  3. FourthButton = 8, FifthButton = 16

Source Edit

  1. MouseEvent {.importc.} = ref object of UIEvent
  2. altKey*, ctrlKey*, metaKey*, shiftKey*: bool
  3. button*: int
  4. buttons*: int
  5. clientX*, clientY*: int
  6. movementX*, movementY*: int
  7. offsetX*, offsetY*: int
  8. pageX*, pageY*: int
  9. relatedTarget*: EventTarget
  10. screenX*, screenY*: int
  11. x*, y*: int

see docs Source Edit

  1. Navigator {.importc.} = ref object of RootObj
  2. appCodeName*: cstring
  3. appName*: cstring
  4. appVersion*: cstring
  5. buildID*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/buildID
  6. cookieEnabled*: bool
  7. deviceMemory*: float ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory
  8. doNotTrack*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
  9. language*: cstring
  10. languages*: seq[cstring] ## https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages
  11. maxTouchPoints*: cint ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints
  12. onLine*: bool ## https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine
  13. oscpu*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/oscpu
  14. platform*: cstring
  15. userAgent*: cstring
  16. vendor*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendor
  17. webdriver*: bool ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver
  18. mimeTypes*: seq[ref MimeType]

Source Edit

  1. Node {.importc.} = ref object of EventTarget
  2. attributes*: seq[Node]
  3. childNodes*: seq[Node]
  4. children*: seq[Node]
  5. data*: cstring
  6. firstChild*: Node
  7. lastChild*: Node
  8. nextSibling*: Node
  9. nodeName*: cstring
  10. nodeType*: NodeType
  11. nodeValue*: cstring
  12. parentNode*: Node
  13. content*: Node
  14. previousSibling*: Node
  15. ownerDocument*: Document
  16. innerHTML*: cstring
  17. outerHTML*: cstring
  18. innerText*: cstring
  19. textContent*: cstring
  20. style*: Style
  21. baseURI*: cstring
  22. parentElement*: Element
  23. isConnected*: bool

Source Edit

  1. NodeType = enum
  2. ElementNode = 1, AttributeNode, TextNode, CDATANode, EntityRefNode,
  3. EntityNode, ProcessingInstructionNode, CommentNode, DocumentNode,
  4. DocumentTypeNode, DocumentFragmentNode, NotationNode

Source Edit

  1. OptionElement {.importc.} = ref object of Element
  2. defaultSelected*: bool
  3. selected*: bool
  4. selectedIndex*: int
  5. text*: cstring
  6. value*: cstring

Source Edit

  1. Performance {.importc.} = ref object
  2. memory*: PerformanceMemory
  3. timing*: PerformanceTiming

Source Edit

  1. PerformanceMemory {.importc.} = ref object
  2. jsHeapSizeLimit*: float
  3. totalJSHeapSize*: float
  4. usedJSHeapSize*: float

Source Edit

  1. PerformanceTiming {.importc.} = ref object
  2. connectStart*: float
  3. domComplete*: float
  4. domContentLoadedEventEnd*: float
  5. domContentLoadedEventStart*: float
  6. domInteractive*: float
  7. domLoading*: float
  8. domainLookupEnd*: float
  9. domainLookupStart*: float
  10. fetchStart*: float
  11. loadEventEnd*: float
  12. loadEventStart*: float
  13. navigationStart*: float
  14. redirectEnd*: float
  15. redirectStart*: float
  16. requestStart*: float
  17. responseEnd*: float
  18. responseStart*: float
  19. secureConnectionStart*: float
  20. unloadEventEnd*: float
  21. unloadEventStart*: float

Source Edit

  1. PersonalBar = LocationBar

Source Edit

  1. Plugin {.importc.} = object of RootObj
  2. description*: cstring
  3. filename*: cstring
  4. name*: cstring

Source Edit

  1. Range {.importc.} = ref object
  2. collapsed*: bool
  3. commonAncestorContainer*: Node
  4. endContainer*: Node
  5. endOffset*: int
  6. startContainer*: Node
  7. startOffset*: int

see docs Source Edit

  1. RootNodeOptions = object of RootObj
  2. composed*: bool

Source Edit

  1. Screen {.importc.} = ref object of RootObj
  2. availHeight*: int
  3. availWidth*: int
  4. colorDepth*: int
  5. height*: int
  6. pixelDepth*: int
  7. width*: int

Source Edit

  1. ScrollBars = LocationBar

Source Edit

  1. ScrollIntoViewOptions = object
  2. behavior*: cstring
  3. inline*: cstring

Source Edit

  1. Selection {.importc.} = ref object
  2. anchorNode*: Node
  3. anchorOffset*: int
  4. focusNode*: Node
  5. focusOffset*: int
  6. isCollapsed*: bool
  7. rangeCount*: int

see docs Source Edit

  1. ShadowRoot {.importc.} = ref object of DocumentOrShadowRoot
  2. delegatesFocus*: bool
  3. host*: Element
  4. innerHTML*: cstring
  5. mode*: cstring

Source Edit

  1. ShadowRootInit = object of RootObj
  2. mode*: cstring
  3. delegatesFocus*: bool

Source Edit

  1. SlotOptions = object of RootObj
  2. flatten*: bool

Source Edit

  1. StatusBar = LocationBar

Source Edit

  1. Storage {.importc.} = ref object

Source Edit

  1. StorageEvent {.importc.} = ref object of Event
  2. key*: cstring
  3. newValue*, oldValue*: cstring
  4. storageArea*: Storage
  5. url*: cstring

see docs Source Edit

  1. Style {.importc.} = ref object of RootObj
  2. alignContent*: cstring
  3. alignItems*: cstring
  4. alignSelf*: cstring
  5. all*: cstring
  6. animation*: cstring
  7. animationDelay*: cstring
  8. animationDirection*: cstring
  9. animationDuration*: cstring
  10. animationFillMode*: cstring
  11. animationIterationCount*: cstring
  12. animationName*: cstring
  13. animationPlayState*: cstring
  14. animationTimingFunction*: cstring
  15. backdropFilter*: cstring
  16. backfaceVisibility*: cstring
  17. background*: cstring
  18. backgroundAttachment*: cstring
  19. backgroundBlendMode*: cstring
  20. backgroundClip*: cstring
  21. backgroundColor*: cstring
  22. backgroundImage*: cstring
  23. backgroundOrigin*: cstring
  24. backgroundPosition*: cstring
  25. backgroundRepeat*: cstring
  26. backgroundSize*: cstring
  27. blockSize*: cstring
  28. border*: cstring
  29. borderBlock*: cstring
  30. borderBlockColor*: cstring
  31. borderBlockEnd*: cstring
  32. borderBlockEndColor*: cstring
  33. borderBlockEndStyle*: cstring
  34. borderBlockEndWidth*: cstring
  35. borderBlockStart*: cstring
  36. borderBlockStartColor*: cstring
  37. borderBlockStartStyle*: cstring
  38. borderBlockStartWidth*: cstring
  39. borderBlockStyle*: cstring
  40. borderBlockWidth*: cstring
  41. borderBottom*: cstring
  42. borderBottomColor*: cstring
  43. borderBottomLeftRadius*: cstring
  44. borderBottomRightRadius*: cstring
  45. borderBottomStyle*: cstring
  46. borderBottomWidth*: cstring
  47. borderCollapse*: cstring
  48. borderColor*: cstring
  49. borderEndEndRadius*: cstring
  50. borderEndStartRadius*: cstring
  51. borderImage*: cstring
  52. borderImageOutset*: cstring
  53. borderImageRepeat*: cstring
  54. borderImageSlice*: cstring
  55. borderImageSource*: cstring
  56. borderImageWidth*: cstring
  57. borderInline*: cstring
  58. borderInlineColor*: cstring
  59. borderInlineEnd*: cstring
  60. borderInlineEndColor*: cstring
  61. borderInlineEndStyle*: cstring
  62. borderInlineEndWidth*: cstring
  63. borderInlineStart*: cstring
  64. borderInlineStartColor*: cstring
  65. borderInlineStartStyle*: cstring
  66. borderInlineStartWidth*: cstring
  67. borderInlineStyle*: cstring
  68. borderInlineWidth*: cstring
  69. borderLeft*: cstring
  70. borderLeftColor*: cstring
  71. borderLeftStyle*: cstring
  72. borderLeftWidth*: cstring
  73. borderRadius*: cstring
  74. borderRight*: cstring
  75. borderRightColor*: cstring
  76. borderRightStyle*: cstring
  77. borderRightWidth*: cstring
  78. borderSpacing*: cstring
  79. borderStartEndRadius*: cstring
  80. borderStartStartRadius*: cstring
  81. borderStyle*: cstring
  82. borderTop*: cstring
  83. borderTopColor*: cstring
  84. borderTopLeftRadius*: cstring
  85. borderTopRightRadius*: cstring
  86. borderTopStyle*: cstring
  87. borderTopWidth*: cstring
  88. borderWidth*: cstring
  89. bottom*: cstring
  90. boxDecorationBreak*: cstring
  91. boxShadow*: cstring
  92. boxSizing*: cstring
  93. breakAfter*: cstring
  94. breakBefore*: cstring
  95. breakInside*: cstring
  96. captionSide*: cstring
  97. caretColor*: cstring
  98. clear*: cstring
  99. clip*: cstring
  100. clipPath*: cstring
  101. color*: cstring
  102. colorAdjust*: cstring
  103. columnCount*: cstring
  104. columnFill*: cstring
  105. columnGap*: cstring
  106. columnRule*: cstring
  107. columnRuleColor*: cstring
  108. columnRuleStyle*: cstring
  109. columnRuleWidth*: cstring
  110. columnSpan*: cstring
  111. columnWidth*: cstring
  112. columns*: cstring
  113. contain*: cstring
  114. content*: cstring
  115. counterIncrement*: cstring
  116. counterReset*: cstring
  117. counterSet*: cstring
  118. cursor*: cstring
  119. direction*: cstring
  120. display*: cstring
  121. emptyCells*: cstring
  122. filter*: cstring
  123. flex*: cstring
  124. flexBasis*: cstring
  125. flexDirection*: cstring
  126. flexFlow*: cstring
  127. flexGrow*: cstring
  128. flexShrink*: cstring
  129. flexWrap*: cstring
  130. cssFloat*: cstring
  131. font*: cstring
  132. fontFamily*: cstring
  133. fontFeatureSettings*: cstring
  134. fontKerning*: cstring
  135. fontLanguageOverride*: cstring
  136. fontOpticalSizing*: cstring
  137. fontSize*: cstring
  138. fontSizeAdjust*: cstring
  139. fontStretch*: cstring
  140. fontStyle*: cstring
  141. fontSynthesis*: cstring
  142. fontVariant*: cstring
  143. fontVariantAlternates*: cstring
  144. fontVariantCaps*: cstring
  145. fontVariantEastAsian*: cstring
  146. fontVariantLigatures*: cstring
  147. fontVariantNumeric*: cstring
  148. fontVariantPosition*: cstring
  149. fontVariationSettings*: cstring
  150. fontWeight*: cstring
  151. gap*: cstring
  152. grid*: cstring
  153. gridArea*: cstring
  154. gridAutoColumns*: cstring
  155. gridAutoFlow*: cstring
  156. gridAutoRows*: cstring
  157. gridColumn*: cstring
  158. gridColumnEnd*: cstring
  159. gridColumnStart*: cstring
  160. gridRow*: cstring
  161. gridRowEnd*: cstring
  162. gridRowStart*: cstring
  163. gridTemplate*: cstring
  164. gridTemplateAreas*: cstring
  165. gridTemplateColumns*: cstring
  166. gridTemplateRows*: cstring
  167. hangingPunctuation*: cstring
  168. height*: cstring
  169. hyphens*: cstring
  170. imageOrientation*: cstring
  171. imageRendering*: cstring
  172. inlineSize*: cstring
  173. inset*: cstring
  174. insetBlock*: cstring
  175. insetBlockEnd*: cstring
  176. insetBlockStart*: cstring
  177. insetInline*: cstring
  178. insetInlineEnd*: cstring
  179. insetInlineStart*: cstring
  180. isolation*: cstring
  181. justifyContent*: cstring
  182. justifyItems*: cstring
  183. justifySelf*: cstring
  184. left*: cstring
  185. letterSpacing*: cstring
  186. lineBreak*: cstring
  187. lineHeight*: cstring
  188. listStyle*: cstring
  189. listStyleImage*: cstring
  190. listStylePosition*: cstring
  191. listStyleType*: cstring
  192. margin*: cstring
  193. marginBlock*: cstring
  194. marginBlockEnd*: cstring
  195. marginBlockStart*: cstring
  196. marginBottom*: cstring
  197. marginInline*: cstring
  198. marginInlineEnd*: cstring
  199. marginInlineStart*: cstring
  200. marginLeft*: cstring
  201. marginRight*: cstring
  202. marginTop*: cstring
  203. mask*: cstring
  204. maskBorder*: cstring
  205. maskBorderMode*: cstring
  206. maskBorderOutset*: cstring
  207. maskBorderRepeat*: cstring
  208. maskBorderSlice*: cstring
  209. maskBorderSource*: cstring
  210. maskBorderWidth*: cstring
  211. maskClip*: cstring
  212. maskComposite*: cstring
  213. maskImage*: cstring
  214. maskMode*: cstring
  215. maskOrigin*: cstring
  216. maskPosition*: cstring
  217. maskRepeat*: cstring
  218. maskSize*: cstring
  219. maskType*: cstring
  220. maxBlockSize*: cstring
  221. maxHeight*: cstring
  222. maxInlineSize*: cstring
  223. maxWidth*: cstring
  224. minBlockSize*: cstring
  225. minHeight*: cstring
  226. minInlineSize*: cstring
  227. minWidth*: cstring
  228. mixBlendMode*: cstring
  229. objectFit*: cstring
  230. objectPosition*: cstring
  231. offset*: cstring
  232. offsetAnchor*: cstring
  233. offsetDistance*: cstring
  234. offsetPath*: cstring
  235. offsetRotate*: cstring
  236. opacity*: cstring
  237. order*: cstring
  238. orphans*: cstring
  239. outline*: cstring
  240. outlineColor*: cstring
  241. outlineOffset*: cstring
  242. outlineStyle*: cstring
  243. outlineWidth*: cstring
  244. overflow*: cstring
  245. overflowAnchor*: cstring
  246. overflowBlock*: cstring
  247. overflowInline*: cstring
  248. overflowWrap*: cstring
  249. overflowX*: cstring
  250. overflowY*: cstring
  251. overscrollBehavior*: cstring
  252. overscrollBehaviorBlock*: cstring
  253. overscrollBehaviorInline*: cstring
  254. overscrollBehaviorX*: cstring
  255. overscrollBehaviorY*: cstring
  256. padding*: cstring
  257. paddingBlock*: cstring
  258. paddingBlockEnd*: cstring
  259. paddingBlockStart*: cstring
  260. paddingBottom*: cstring
  261. paddingInline*: cstring
  262. paddingInlineEnd*: cstring
  263. paddingInlineStart*: cstring
  264. paddingLeft*: cstring
  265. paddingRight*: cstring
  266. paddingTop*: cstring
  267. pageBreakAfter*: cstring
  268. pageBreakBefore*: cstring
  269. pageBreakInside*: cstring
  270. paintOrder*: cstring
  271. perspective*: cstring
  272. perspectiveOrigin*: cstring
  273. placeContent*: cstring
  274. placeItems*: cstring
  275. placeSelf*: cstring
  276. pointerEvents*: cstring
  277. position*: cstring
  278. quotes*: cstring
  279. resize*: cstring
  280. right*: cstring
  281. rotate*: cstring
  282. rowGap*: cstring
  283. scale*: cstring
  284. scrollBehavior*: cstring
  285. scrollMargin*: cstring
  286. scrollMarginBlock*: cstring
  287. scrollMarginBlockEnd*: cstring
  288. scrollMarginBlockStart*: cstring
  289. scrollMarginBottom*: cstring
  290. scrollMarginInline*: cstring
  291. scrollMarginInlineEnd*: cstring
  292. scrollMarginInlineStart*: cstring
  293. scrollMarginLeft*: cstring
  294. scrollMarginRight*: cstring
  295. scrollMarginTop*: cstring
  296. scrollPadding*: cstring
  297. scrollPaddingBlock*: cstring
  298. scrollPaddingBlockEnd*: cstring
  299. scrollPaddingBlockStart*: cstring
  300. scrollPaddingBottom*: cstring
  301. scrollPaddingInline*: cstring
  302. scrollPaddingInlineEnd*: cstring
  303. scrollPaddingInlineStart*: cstring
  304. scrollPaddingLeft*: cstring
  305. scrollPaddingRight*: cstring
  306. scrollPaddingTop*: cstring
  307. scrollSnapAlign*: cstring
  308. scrollSnapStop*: cstring
  309. scrollSnapType*: cstring
  310. scrollbar3dLightColor*: cstring
  311. scrollbarArrowColor*: cstring
  312. scrollbarBaseColor*: cstring
  313. scrollbarColor*: cstring
  314. scrollbarDarkshadowColor*: cstring
  315. scrollbarFaceColor*: cstring
  316. scrollbarHighlightColor*: cstring
  317. scrollbarShadowColor*: cstring
  318. scrollbarTrackColor*: cstring
  319. scrollbarWidth*: cstring
  320. shapeImageThreshold*: cstring
  321. shapeMargin*: cstring
  322. shapeOutside*: cstring
  323. tabSize*: cstring
  324. tableLayout*: cstring
  325. textAlign*: cstring
  326. textAlignLast*: cstring
  327. textCombineUpright*: cstring
  328. textDecoration*: cstring
  329. textDecorationColor*: cstring
  330. textDecorationLine*: cstring
  331. textDecorationSkipInk*: cstring
  332. textDecorationStyle*: cstring
  333. textDecorationThickness*: cstring
  334. textEmphasis*: cstring
  335. textEmphasisColor*: cstring
  336. textEmphasisPosition*: cstring
  337. textEmphasisStyle*: cstring
  338. textIndent*: cstring
  339. textJustify*: cstring
  340. textOrientation*: cstring
  341. textOverflow*: cstring
  342. textRendering*: cstring
  343. textShadow*: cstring
  344. textTransform*: cstring
  345. textUnderlineOffset*: cstring
  346. textUnderlinePosition*: cstring
  347. top*: cstring
  348. touchAction*: cstring
  349. transform*: cstring
  350. transformBox*: cstring
  351. transformOrigin*: cstring
  352. transformStyle*: cstring
  353. transition*: cstring
  354. transitionDelay*: cstring
  355. transitionDuration*: cstring
  356. transitionProperty*: cstring
  357. transitionTimingFunction*: cstring
  358. translate*: cstring
  359. unicodeBidi*: cstring
  360. verticalAlign*: cstring
  361. visibility*: cstring
  362. whiteSpace*: cstring
  363. widows*: cstring
  364. width*: cstring
  365. willChange*: cstring
  366. wordBreak*: cstring
  367. wordSpacing*: cstring
  368. writingMode*: cstring
  369. zIndex*: cstring

Source Edit

  1. TextAreaElement {.importc.} = ref object of Element
  2. value*: cstring
  3. selectionStart*, selectionEnd*: int
  4. selectionDirection*: cstring
  5. rows*, cols*: int

see docs Source Edit

  1. TimeOut {.importc.} = ref object of RootObj

Source Edit

  1. ToolBar = LocationBar

Source Edit

  1. Touch {.importc.} = ref object of RootObj
  2. identifier*: int
  3. screenX*, screenY*, clientX*, clientY*, pageX*, pageY*: int
  4. target*: Element
  5. radiusX*, radiusY*: int
  6. rotationAngle*: int
  7. force*: float

Source Edit

  1. TouchEvent {.importc.} = ref object of UIEvent
  2. changedTouches*, targetTouches*, touches*: seq[Touch]

Source Edit

  1. TouchList {.importc.} = ref object of RootObj
  2. length*: int

Source Edit

  1. UIEvent {.importc.} = ref object of Event
  2. detail*: int64
  3. view*: Window

see docs Source Edit

  1. ValidityState {.importc.} = ref object
  2. badInput*: bool
  3. customError*: bool
  4. patternMismatch*: bool
  5. rangeOverflow*: bool
  6. rangeUnderflow*: bool
  7. stepMismatch*: bool
  8. tooLong*: bool
  9. tooShort*: bool
  10. typeMismatch*: bool
  11. valid*: bool
  12. valueMissing*: bool

see docs Source Edit

  1. Window {.importc.} = ref object of EventTarget
  2. document*: Document
  3. event*: Event
  4. history*: History
  5. location*: Location
  6. closed*: bool
  7. defaultStatus*: cstring
  8. devicePixelRatio*: float
  9. innerHeight*, innerWidth*: int
  10. locationbar*: ref LocationBar
  11. menubar*: ref MenuBar
  12. name*: cstring
  13. outerHeight*, outerWidth*: int
  14. pageXOffset*, pageYOffset*: int
  15. scrollX*: float
  16. scrollY*: float
  17. personalbar*: ref PersonalBar
  18. scrollbars*: ref ScrollBars
  19. statusbar*: ref StatusBar
  20. status*: cstring
  21. toolbar*: ref ToolBar
  22. frames*: seq[Frame]
  23. screen*: Screen
  24. performance*: Performance
  25. onpopstate*: proc (event: Event)
  26. localStorage*: Storage
  27. sessionStorage*: Storage
  28. parent*: Window

Source Edit

Vars

  1. document {.importc, nodecl.}: Document

Source Edit

  1. navigator {.importc, nodecl.}: Navigator

Source Edit

  1. screen {.importc, nodecl.}: Screen

Source Edit

  1. window {.importc, nodecl.}: Window

Source Edit

Consts

  1. DomApiVersion = 3

the version of DOM API we try to follow. No guarantees though. Source Edit

  1. fileReaderDone = 2'u

Source Edit

  1. fileReaderEmpty = 0'u

Source Edit

  1. fileReaderLoading = 1'u

Source Edit

Procs

  1. proc `$`(s: Selection): string {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc `[]`(x: Node; idx: int): Element {.importcpp: "#.childNodes[#]",
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc abort(f: FileReader) {.importcpp: "#.abort()", ...raises: [], tags: [],
  2. forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/abort Source Edit

  1. proc add(c: ClassList; class: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc addEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event);
  2. options: AddEventListenerOptions) {.importcpp, ...raises: [],
  3. tags: [], forbids: [].}

Source Edit

  1. proc addEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event);
  2. useCapture: bool = false) {.importcpp, ...raises: [],
  3. tags: [], forbids: [].}

Source Edit

  1. proc after(self: Node; element: Node): Node {.importjs: "#.$1(@)", varargs,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/after Source Edit

  1. proc alert(w: Window; msg: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc append(self: Node; element: Node): Node {.importjs: "#.$1(@)", varargs,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/append Source Edit

  1. proc appendChild(n, child: Node) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc appendData(n: Node; data: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc assignedElements(n: HTMLSlotElement; options: SlotOptions): seq[Element] {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc assignedNodes(n: HTMLSlotElement; options: SlotOptions): seq[Node] {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc attachShadow(n: Element): ShadowRoot {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc back(h: History) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc back(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc before(self: Node; element: Node): Node {.importjs: "#.$1(@)", varargs,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/before Source Edit

  1. proc blur(e: Element) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc blur(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc cancelAnimationFrame(w: Window; id: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc canShare(self: Navigator; data: cstring): bool {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare Source Edit

  1. proc checked(n: Node): bool {.importcpp: "#.checked", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc checked=(n: Node; v: bool) {.importcpp: "#.checked = #", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc checkValidity(e: FormElement): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc checkValidity(e: InputElement): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc class(n: Node): cstring {.importcpp: "#.className", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc class=(n: Node; v: cstring) {.importcpp: "#.className = #", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc clear(s: Storage) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc clearData(dt: DataTransfer; format: cstring) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc clearInterval(i: Interval) {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc clearInterval(w: Window; interval: Interval) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc clearTimeout(t: TimeOut) {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc clearTimeout(w: Window; timeout: TimeOut) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc click(e: Element) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc clientHeight(): int {.importcpp: "(window.innerHeight || document.documentElement.clientHeight)@",
  2. nodecl, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc clientWidth(): int {.importcpp: "(window.innerWidth || document.documentElement.clientWidth)@",
  2. nodecl, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc cloneNode(n: Node; copyContent: bool): Node {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc close(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc closest(self: Node; cssSelector: cstring): Node {.importjs: "#.$1(#)",
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/closest Source Edit

  1. proc compareDocumentPosition(n: Node; otherNode: Node): int {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc confirm(w: Window; msg: cstring): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc contains(c: ClassList; class: cstring): bool {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc contains(n: Node): bool {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc createAttribute(d: Document; identifier: cstring): Node {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc createComment(d: Document; data: cstring): Node {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc createElement(d: Document; identifier: cstring): Element {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc createElementNS(d: Document; namespaceURI, qualifiedIdentifier: cstring): Element {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc createTextNode(d: Document; identifier: cstring): Node {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc decodeURI(uri: cstring): cstring {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc decodeURIComponent(uri: cstring): cstring {.importc, nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc deleteData(n: Node; start, len: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc deleteFromDocument(s: Selection) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc disabled=(n: Node; v: bool) {.importcpp: "#.disabled = #", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc disableExternalCapture(w: Window) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc dispatchEvent(et: EventTarget; ev: Event) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc elementFromPoint(n: DocumentOrShadowRoot; x, y: float): Element {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc elementsFromPoint(n: DocumentOrShadowRoot; x, y: float): seq[Element] {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc enableExternalCapture(w: Window) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc encodeURI(uri: cstring): cstring {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc encodeURIComponent(uri: cstring): cstring {.importc, nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc error(f: FileReader): DomException {.importcpp: "#.error", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/error Source Edit

  1. proc escape(uri: cstring): cstring {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc find(w: Window; text: cstring; caseSensitive = false; backwards = false): bool {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc focus(e: Element) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc focus(e: Node) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc focus(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc forward(h: History) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc forward(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getAsFile(dti: DataTransferItem): File {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc getAttribute(n: Node; attr: cstring): cstring {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc getAttributeNode(n: Node; attr: cstring): Node {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc getBoundingClientRect(e: Node): BoundingRect {.
  2. importcpp: "getBoundingClientRect", nodecl, ...raises: [], tags: [],
  3. forbids: [].}

Source Edit

  1. proc getComputedStyle(w: Window; e: Node; pe: Node = nil): Style {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Warning: The returned Style may or may not be read-only at run-time in the browser. getComputedStyle is performance costly.

Source Edit

  1. proc getData(dt: DataTransfer; format: cstring): cstring {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getElementById(d: Document; id: cstring): Element {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc getElementById(id: cstring): Element {.importc: "document.getElementById",
  2. nodecl, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getElementsByClass(n: Node; name: cstring): seq[Node] {.
  2. importcpp: "#.getElementsByClassName(#)", nodecl, ...raises: [], tags: [],
  3. forbids: [].}

Source Edit

  1. proc getElementsByClassName(d: Document; name: cstring): seq[Element] {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getElementsByClassName(e: Element; name: cstring): seq[Element] {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getElementsByName(d: Document; name: cstring): seq[Element] {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getElementsByTagName(d: Document; name: cstring): seq[Element] {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getElementsByTagName(e: Element; name: cstring): seq[Element] {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getItem(s: Storage; key: cstring): cstring {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc getModifierState(ev: KeyboardEvent; keyArg: cstring): bool {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getModifierState(ev: MouseEvent; keyArg: cstring): bool {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getPropertyPriority(s: Style; property: cstring): cstring {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getPropertyValue(s: Style; property: cstring): cstring {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getRangeAt(s: Selection; index: int): Range {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc getRootNode(n: Node; options: RootNodeOptions): Node {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc getSelection(d: Document): Selection {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc getSelection(n: DocumentOrShadowRoot): Selection {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc go(h: History; pagesToJump: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc handleEvent(d: Document; event: Event) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc handleEvent(e: Element; event: Event) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc handleEvent(w: Window; e: Event) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc hasAttribute(n: Node; attr: cstring): bool {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc hasAttributeNS(self: Node; namespace, localName: cstring): bool {.
  2. importjs: "(#.$1(#, #) || false)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttributeNS Source Edit

  1. proc hasChildNodes(n: Node): bool {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc hasItem(s: Storage; key: cstring): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc hasPointerCapture(self: Node; pointerId: SomeNumber): bool {.
  2. importjs: "(#.$1(#) || false)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/hasPointerCapture Source Edit

  1. proc home(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc id(n: Node): cstring {.importcpp: "#.id", nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc id=(n: Node; x: cstring) {.importcpp: "#.id = #", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc identifiedTouch(list: TouchList): Touch {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc insertAdjacentElement(self: Node; position: cstring; element: Node) {.
  2. importjs: "#.$1(#, #)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement Source Edit

  1. proc insertAdjacentHTML(self: Node; position, html: cstring) {.
  2. importjs: "#.$1(#, #)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML Source Edit

  1. proc insertAdjacentText(self: Node; position, data: cstring) {.
  2. importjs: "#.$1(#, #)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentText Source Edit

  1. proc insertBefore(n, newNode, before: Node) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc insertData(n: Node; position: int; data: cstring) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc insertNode(range: Range; node: Node) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc inViewport(el: Node): bool {....raises: [], tags: [], forbids: [].}

Source Edit

  1. proc isDefaultNamespace(n: Node): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc isEqualNode(n: Node): bool {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc isFinite(x: BiggestFloat): bool {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc isNaN(x: BiggestFloat): bool {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

see also math.isNaN. Source Edit

  1. proc isSameNode(n: Node): bool {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc item(list: TouchList; i: int): Touch {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc javaEnabled(h: Navigator): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc len(x: Node): int {.importcpp: "#.childNodes.length", ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc lookupNamespaceURI(n: Node): cstring {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc lookupPrefix(n: Node): cstring {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc matches(self: Node; cssSelector: cstring): bool {.
  2. importjs: "(#.$1(#) || false)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/matches Source Edit

  1. proc matchMedia(w: Window; mediaQueryString: cstring): MediaQueryList {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc message(ex: DomException): cstring {.importcpp: "#.message", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/DOMException/message Source Edit

  1. proc moveBy(w: Window; x, y: int) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc moveTo(w: Window; x, y: int) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc name(ex: DomException): cstring {.importcpp: "#.name", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/DOMException/name Source Edit

  1. proc newDomException(): DomException {.importcpp: "new DomException()",
  2. constructor, ...raises: [], tags: [],
  3. forbids: [].}

DOM Exception constructor Source Edit

  1. func newDomParser(): DomParser {.importcpp: "new DOMParser()", ...raises: [],
  2. tags: [], forbids: [].}

DOM Parser constructor. Source Edit

  1. proc newEvent(name: cstring): Event {.importcpp: "new Event(@)", constructor,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc newFileReader(): FileReader {.importcpp: "new FileReader()", constructor,
  2. ...raises: [], tags: [], forbids: [].}

File Reader constructor Source Edit

  1. proc normalize(n: Node) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc now(p: Performance): float {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc offsetHeight(e: Node): int {.importcpp: "#.offsetHeight", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc offsetLeft(e: Node): int {.importcpp: "#.offsetLeft", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc offsetTop(e: Node): int {.importcpp: "#.offsetTop", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc offsetWidth(e: Node): int {.importcpp: "#.offsetWidth", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc open(d: Document) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc open(w: Window; uri, windowname: cstring; properties: cstring = nil): Window {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. func parseFromString(this: DomParser; str: cstring; mimeType: cstring): Document {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Parse from string to Document. Source Edit

  1. proc play(e: EmbedElement) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc preventDefault(ev: Event) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc print(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc prompt(w: Window; text, default: cstring): cstring {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc pushState[T](h: History; stateObject: T; title, url: cstring) {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc querySelector(d: Document; selectors: cstring): Element {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc querySelector(n: Node; selectors: cstring): Element {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc querySelectorAll(d: Document; selectors: cstring): seq[Element] {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc querySelectorAll(n: Node; selectors: cstring): seq[Element] {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc readAsBinaryString(f: FileReader; b: Blob) {.
  2. importcpp: "#.readAsBinaryString(#)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsBinaryString Source Edit

  1. proc readAsDataURL(f: FileReader; b: Blob) {.importcpp: "#.readAsDataURL(#)",
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL Source Edit

  1. proc readAsText(f: FileReader; b: Blob | File; encoding = cstring"UTF-8") {.
  2. importcpp: "#.readAsText(#, #)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsText Source Edit

  1. proc readyState(f: FileReader): FileReaderState {.importcpp: "#.readyState",
  2. nodecl, ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readyState Source Edit

  1. proc registerProtocolHandler(self: Navigator; scheme, url, title: cstring) {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler Source Edit

  1. proc releasePointerCapture(self: Node; pointerId: SomeNumber) {.
  2. importjs: "#.$1(#)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/releasePointerCapture Source Edit

  1. proc reload(loc: Location) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc remove(c: ClassList; class: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc remove(child: Node) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc removeAllRanges(s: Selection) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc removeAttribute(n: Node; attr: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc removeAttributeNode(n, attr: Node) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc removeAttributeNS(self: Node; namespace, attributeName: cstring) {.
  2. importjs: "#.$1(#, #)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttributeNS Source Edit

  1. proc removeChild(n, child: Node) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc removeEventListener(et: EventTarget; ev: cstring; cb: proc (ev: Event)) {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc removeItem(s: Storage; key: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc removeProperty(s: Style; property: cstring) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc replace(loc: Location; s: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc replaceChild(n, newNode, oldNode: Node) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc replaceChildren(self: Node; replacements: Node) {.importjs: "#.$1(@)",
  2. varargs, ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceChildren Source Edit

  1. proc replaceData(n: Node; start, len: int; text: cstring) {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc replaceWith(self: Node; replacements: Node) {.importjs: "#.$1(@)", varargs,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/replaceWith Source Edit

  1. proc reportValidity(e: FormElement): bool {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc requestAnimationFrame(w: Window; function: proc (time: float)): int {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc requestPointerLock(self: Node) {.importjs: "#.$1()", ...raises: [], tags: [],
  2. forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/requestPointerLock Source Edit

  1. proc reset(f: FormElement) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc resizeBy(w: Window; x, y: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc resizeTo(w: Window; x, y: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc resultAsString(f: FileReader): cstring {.importcpp: "#.result", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/FileReader/result Source Edit

  1. proc routeEvent(d: Document; event: Event) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc routeEvent(w: Window; event: Event) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc scrollBy(w: Window; x, y: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc scrollHeight(e: Node): int {.importcpp: "#.scrollHeight", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc scrollIntoView(n: Node) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc scrollIntoView(n: Node; options: ScrollIntoViewOptions) {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc scrollIntoViewIfNeeded(self: Node; centerIfNeeded: bool) {.
  2. importjs: "#.$1(#)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded Source Edit

  1. proc scrollLeft(e: Node): int {.importcpp: "#.scrollLeft", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc scrollTo(w: Window; x, y: int) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc scrollTop(e: Node): int {.importcpp: "#.scrollTop", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc scrollTop=(e: Node; value: int) {.importcpp: "#.scrollTop = #", nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc scrollWidth(e: Node): int {.importcpp: "#.scrollWidth", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc select(e: Element) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc sendBeacon(self: Navigator; url, data: cstring): bool {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon Source Edit

  1. proc setAttr(n: Node; key, val: cstring) {.importcpp: "#.setAttribute(@)",
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setAttribute(n: Node; name, value: cstring) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc setAttributeNode(n: Node; attr: Node) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc setCustomValidity(e: InputElement; error: cstring) {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc setData(dt: DataTransfer; format: cstring; data: cstring) {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setDragImage(dt: DataTransfer; img: Element; xOffset: int64; yOffset: int64) {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setHTML(self: Node; html: cstring) {.importjs: "#.$1(#)", ...raises: [],
  2. tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML Source Edit

  1. proc setInterval(action: proc (); ms: int): Interval {.importc, nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setInterval(w: Window; code: cstring; pause: int): Interval {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setInterval(w: Window; function: proc (); pause: int): Interval {.
  2. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setItem(s: Storage; key, value: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc setProperty(s: Style; property, value: cstring; priority = "") {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setRangeText(e: InputElement; replacement: cstring; startindex: int = 0;
  2. endindex: int = 0; selectionMode: cstring = "preserve") {.
  3. importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setSelectionRange(e: InputElement; selectionStart: int; selectionEnd: int;
  2. selectionDirection: cstring = "none") {.importcpp,
  3. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setTimeout(action: proc (); ms: int): TimeOut {.importc, nodecl,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setTimeout(w: Window; code: cstring; pause: int): TimeOut {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc setTimeout(w: Window; function: proc (); pause: int): Interval {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc slice(e: Blob; startindex: int = 0; endindex: int = e.size;
  2. contentType: cstring = "") {.importcpp, ...raises: [], tags: [],
  3. forbids: [].}

Source Edit

  1. proc stop(e: EmbedElement) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc stop(w: Window) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc stopImmediatePropagation(ev: Event) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc stopPropagation(ev: Event) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc submit(f: FormElement) {.importcpp, ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc toggle(c: ClassList; class: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc toggleAttribute(self: Node; name: cstring; force = false): bool {.
  2. importjs: "(#.$1(#, #) || false)", ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Element/toggleAttribute Source Edit

  1. proc unescape(uri: cstring): cstring {.importc, nodecl, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc value(n: Node): cstring {.importcpp: "#.value", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc value=(n: Node; v: cstring) {.importcpp: "#.value = #", nodecl, ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc vibrate(self: Navigator; pattern: cint): bool {.importcpp, ...raises: [],
  2. tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate Source Edit

  1. proc vibrate(self: Navigator; pattern: openArray[cint]): bool {.importcpp,
  2. ...raises: [], tags: [], forbids: [].}

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate Source Edit

  1. proc write(d: Document; text: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc writeln(d: Document; text: cstring) {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

Converters

  1. converter toString(s: Selection): cstring {.importcpp, ...raises: [], tags: [],
  2. forbids: [].}

Source Edit