Add Modernizr warning when running in non-secure context (#28581)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
bfac727307
commit
9c74110969
1 changed files with 4 additions and 0 deletions
|
@ -67,6 +67,10 @@ function checkBrowserFeatures(): boolean {
|
||||||
// although this would start to make (more) assumptions about how rust-crypto loads its wasm.
|
// although this would start to make (more) assumptions about how rust-crypto loads its wasm.
|
||||||
window.Modernizr.addTest("wasm", () => typeof WebAssembly === "object" && typeof WebAssembly.Module === "function");
|
window.Modernizr.addTest("wasm", () => typeof WebAssembly === "object" && typeof WebAssembly.Module === "function");
|
||||||
|
|
||||||
|
// Check that the session is in a secure context otherwise most Crypto & WebRTC APIs will be unavailable
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/API/Window/isSecureContext
|
||||||
|
window.Modernizr.addTest("securecontext", () => window.isSecureContext);
|
||||||
|
|
||||||
const featureList = Object.keys(window.Modernizr) as Array<keyof ModernizrStatic>;
|
const featureList = Object.keys(window.Modernizr) as Array<keyof ModernizrStatic>;
|
||||||
|
|
||||||
let featureComplete = true;
|
let featureComplete = true;
|
||||||
|
|
Loading…
Reference in a new issue