add dom.scrollIntoView with options; refs #18093 (#18181)

This commit is contained in:
Rainbow Asteroids 2021-06-05 03:07:26 -04:00 • committed by GitHub
commit 295429f425
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -335,6 +335,8 @@
- Added setCurrentException for JS backend. - Added setCurrentException for JS backend.
- Added `dom.scrollIntoView` proc with options
## Language changes ## Language changes
- `nimscript` now handles `except Exception as e`. - `nimscript` now handles `except Exception as e`.

View file

@ -1317,6 +1317,11 @@ type
ready*: FontFaceSetReady ready*: FontFaceSetReady
onloadingdone*: proc(event: Event) onloadingdone*: proc(event: Event)
ScrollIntoViewOptions* = object
behavior*: cstring
`block`*: cstring
inline*: cstring
since (1, 3): since (1, 3):
type type
DomParser* = ref object DomParser* = ref object
@ -1538,6 +1543,7 @@ proc removeAttribute*(n: Node, attr: cstring)
proc removeAttributeNode*(n, attr: Node) proc removeAttributeNode*(n, attr: Node)
proc replaceData*(n: Node, start, len: int, text: cstring) proc replaceData*(n: Node, start, len: int, text: cstring)
proc scrollIntoView*(n: Node) proc scrollIntoView*(n: Node)
proc scrollIntoView*(n: Node, options: ScrollIntoViewOptions)
proc setAttribute*(n: Node, name, value: cstring) proc setAttribute*(n: Node, name, value: cstring)
proc setAttributeNode*(n: Node, attr: Node) proc setAttributeNode*(n: Node, attr: Node)
proc querySelector*(n: Node, selectors: cstring): Element proc querySelector*(n: Node, selectors: cstring): Element