webcrypto-liner is a polyfill that let's down-level User Agents (like IE/Edge) use libraries that depend on WebCrypto. (Keywords: Javascript, WebCrypto, Shim, Polyfill)
MIT License
148
stars
26
forks
source link
Method scope 'this' undefined when destructuring methods from SubtleCrypto instance #84
In Node >=15.x, the WebCrypto API allows destructuring of SubtleCrypto methods:
However, doing this using the liner throws errors (methods and properties called on 'undefined').
A quick workaround is to bind
this
when destructuring:Bad code smell though, and side-effects unknown.