Add Modernizr warning when running in non-secure context (#28581)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28591/head
parent
bfac727307
commit
9c74110969
|
@ -67,6 +67,10 @@ function checkBrowserFeatures(): boolean {
|
|||
// 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");
|
||||
|
||||
// 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>;
|
||||
|
||||
let featureComplete = true;
|
||||
|
|
Loading…
Reference in New Issue