JS: make hash float support IE/Safari (#16872)
This commit is contained in:
parent
206ad43cdc
commit
a2855b66ae
2 changed files with 14 additions and 5 deletions
|
|
@ -16,5 +16,9 @@ when defined(js):
|
|||
func `[]`*(arr: BigUint64Array, i: int): JsBigInt {.importjs: "#[#]".}
|
||||
func `[]=`*(arr: Float64Array, i: int, v: float) {.importjs: "#[#] = #".}
|
||||
|
||||
|
||||
proc hasJsBigInt*(): bool =
|
||||
asm """`result` = typeof BigInt != 'undefined'"""
|
||||
|
||||
proc hasBigUint64Array*(): bool =
|
||||
asm """`result` = typeof BigUint64Array != 'undefined'"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue