英文:
Failed to execute 'openDatabase' on 'Window': Access to the WebDatabase API is denied in non-secure contexts
问题
错误:未知错误 SecurityError:在非安全上下文中拒绝访问 WebDatabase API 执行 'openDatabase'。
JavaScript 代码:
window.openDatabase('teste.db', '1.0', '', 2000 * 1024 * 1024);
期望结果:数据库{版本:'1.0'}。
Chrome 版本 110,在 HTTP 远程地址失败,有解决方案吗?
英文:
Error: Unknown error SecurityError: Failed to execute 'openDatabase' on 'Window': Access to the WebDatabase API is denied in non-secure contexts..
Code javascript:
window.openDatabase('teste.db', '1.0', '', 2000 * 1024 * 1024);
Expecting: Database {version: '1.0'}
Chrome version 110, failed in HTTP remote address, have solution?
答案1
得分: 1
请查看以下链接:
https://chromeenterprise.google/policies/#WebSQLNonSecureContextEnabled
非安全上下文中的WebSQL将在M110版本开始移除。此策略重新启用了该API。如果此策略设置为true,则非安全上下文中的WebSQL将可用。如果此策略设置为false或未设置,则非安全上下文中的WebSQL将在M109之前保持可用,然后在M110版本开始不可用。此更改在M112中移除。
英文:
Check this link:
https://chromeenterprise.google/policies/#WebSQLNonSecureContextEnabled
WebSQL in non-secure contexts will be removed starting M110. This policy re-enables the API. If this policy is set to true, WebSQL in non-secure contexts will be available. If this policy is set to false or unset, WebSQL in non-secure contexts will remain available until M109, then unavailable starting M110. This was removed in M112.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论