We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a741e5 commit 0a5dbaeCopy full SHA for 0a5dbae
html5/js/Utilities.js
@@ -126,6 +126,12 @@ const Utilities = {
126
hash = "SHA-" + hash.substring(3);
127
}
128
129
+ if (typeof crypto.subtle === "undefined") {
130
+ return new Promise(function(resolve, reject) {
131
+ reject(new Error("crypto.subtle API is not available in this context"));
132
+ });
133
+ }
134
+
135
const promise = new Promise(function(resolve, reject) {
136
Utilities.clog("crypto.subtle=", crypto.subtle);
137
Utilities.clog("crypto.subtle.importKey=", crypto.subtle.importKey);
0 commit comments