- Fix #21407

---------

Co-authored-by: Amjad Ben Hedhili <amjadhedhili@outlook.com>
This commit is contained in:
Juan Carlos
2023-09-28 02:37:09 -03:00
committed by GitHub
parent a9e6660a74
commit f0865fa696
2 changed files with 9 additions and 0 deletions

View File

@@ -1832,3 +1832,11 @@ since (1, 7):
proc matches*(self: Node; cssSelector: cstring): bool {.importjs: "(#.$1(#) || false)".}
## https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
since (2, 1):
type VisualViewport* {.importc.} = ref object of EventTarget
offsetLeft*, offsetTop*, pageLeft*, pageTop*, width*, height*, scale*: float
onResize*, onScroll*: proc (event: Event) {.closure.}
func visualViewport*(self: Window): VisualViewport {.importjs: "#.$1", nodecl.}