playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
12 lines (11 loc) • 373 B
JavaScript
import { Debug } from "./debug.js";
const warnInsecureContext = (feature) => {
if (typeof window === "undefined") return;
if (window.isSecureContext !== false) return;
Debug.warnOnce(
`${feature} requires a secure context (HTTPS or localhost). The page is served over an insecure origin; ${feature} will be unavailable.`
);
};
export {
warnInsecureContext
};