当前用的 chrome 版本是 77,在调试时发现获取 window.DeviceOrientationEvent 是 undefined,排除了半天才发现是 http 的锅,只有 https 的网站才能拿到 DeviceOrientationEvent。那开发时弄个 https 也挺麻烦,有啥别的方法绕过吗?
1
Pastsong Oct 2, 2019
localhost 可以绕过
|
2
codehz Oct 3, 2019 chrome://flags/#unsafely-treat-insecure-origin-as-secure 填上你需要的域名,然后重启)
|