You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every single browser implementation attaches the CryptoKey constructor to window or worker global scope. This is very useful for defensive programming when building libraries / code around web crypto, e.g. to fail early on invalid user input (when key is not an instanceof CryptoKey and wanting to offer a useful and consistent error message (unlike the implementation specific ones that often come with no information whatsoever).
I think https://w3c.github.io/webcrypto/#crypto-interface should get updated to reflect what's already the practice today and add CryptoKey alongside of the readonly crypto to WindowOrWorkerGlobalScope.
The text was updated successfully, but these errors were encountered:
Every single browser implementation attaches the CryptoKey constructor to window or worker global scope. This is very useful for defensive programming when building libraries / code around web crypto, e.g. to fail early on invalid user input (when key is not an
instanceof CryptoKey
and wanting to offer a useful and consistent error message (unlike the implementation specific ones that often come with no information whatsoever).I think https://w3c.github.io/webcrypto/#crypto-interface should get updated to reflect what's already the practice today and add CryptoKey alongside of the readonly
crypto
to WindowOrWorkerGlobalScope.The text was updated successfully, but these errors were encountered: