dom.Navigator add missing attributes (#15310)
* Add missing attributes and methods to dom.Navigator * Add missing attributes and methods to dom.Navigator * Add missing attributes and methods to dom.Navigator
This commit is contained in:
parent
6c49767a6c
commit
a667475aaf
2 changed files with 18 additions and 2 deletions
|
|
@ -185,6 +185,7 @@
|
||||||
- Add `getprotobyname` to `winlean`. Add `getProtoByname` to `nativesockets` which returns a protocol code
|
- Add `getprotobyname` to `winlean`. Add `getProtoByname` to `nativesockets` which returns a protocol code
|
||||||
from the database that matches the protocol `name`.
|
from the database that matches the protocol `name`.
|
||||||
|
|
||||||
|
- Add missing attributes and methods to `dom.Navigator` like `deviceMemory`, `onLine`, `vibrate()`, etc.
|
||||||
|
|
||||||
|
|
||||||
## Language changes
|
## Language changes
|
||||||
|
|
|
||||||
|
|
@ -1245,10 +1245,19 @@ type
|
||||||
appCodeName*: cstring
|
appCodeName*: cstring
|
||||||
appName*: cstring
|
appName*: cstring
|
||||||
appVersion*: cstring
|
appVersion*: cstring
|
||||||
|
buildID*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/buildID
|
||||||
cookieEnabled*: bool
|
cookieEnabled*: bool
|
||||||
|
deviceMemory*: float ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory
|
||||||
|
doNotTrack*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
|
||||||
language*: cstring
|
language*: cstring
|
||||||
|
languages*: seq[cstring] ## https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages
|
||||||
|
maxTouchPoints*: cint ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints
|
||||||
|
onLine*: bool ## https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine
|
||||||
|
oscpu*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/oscpu
|
||||||
platform*: cstring
|
platform*: cstring
|
||||||
userAgent*: cstring
|
userAgent*: cstring
|
||||||
|
vendor*: cstring ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vendor
|
||||||
|
webdriver*: bool ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver
|
||||||
mimeTypes*: seq[ref MimeType]
|
mimeTypes*: seq[ref MimeType]
|
||||||
|
|
||||||
Plugin* {.importc.} = object of RootObj
|
Plugin* {.importc.} = object of RootObj
|
||||||
|
|
@ -1581,6 +1590,12 @@ proc pushState*[T](h: History, stateObject: T, title, url: cstring)
|
||||||
|
|
||||||
# Navigator "methods"
|
# Navigator "methods"
|
||||||
proc javaEnabled*(h: Navigator): bool
|
proc javaEnabled*(h: Navigator): bool
|
||||||
|
since (1, 3):
|
||||||
|
proc canShare*(self: Navigator; data: cstring): bool ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare
|
||||||
|
proc sendBeacon*(self: Navigator; url, data: cstring): bool ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon
|
||||||
|
proc vibrate*(self: Navigator; pattern: cint): bool ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
|
||||||
|
proc vibrate*(self: Navigator; pattern: openArray[cint]): bool ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate
|
||||||
|
proc registerProtocolHandler*(self: Navigator; scheme, url, title: cstring) ## https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler
|
||||||
|
|
||||||
# ClassList "methods"
|
# ClassList "methods"
|
||||||
proc add*(c: ClassList, class: cstring)
|
proc add*(c: ClassList, class: cstring)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue