mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
- Fix #21407 --------- Co-authored-by: Amjad Ben Hedhili <amjadhedhili@outlook.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
- Added `newStringUninit` to system, which creates a new string of length `len` like `newString` but with uninitialized content.
|
||||
- Added `hasDefaultValue` to `std/typetraits` to check if a type has a valid default value.
|
||||
- Added Viewport API for the JavaScript targets in the `dom` module.
|
||||
|
||||
[//]: # "Deprecations:"
|
||||
|
||||
|
||||
@@ -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.}
|
||||
|
||||
Reference in New Issue
Block a user