且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Chrome扩展程序/应用程序中绘制到另一个.html页面?

更新时间:2022-12-21 14:15:36

导航已禁用 Chrome Apps平台.从理论上讲,您应该制作单页应用程序-因此您的打开/关闭方法是预期的"应用程序.

Navigation is disabled for the Chrome Apps platform. In theory you are supposed to make single-page apps - so your turn on/off approach is the "intended" one.

没有人会阻止您拥有多个窗口-假设您有一个选项页面,单独打开(通过chrome.app.window.create)并不奇怪

No-one stops you from having several windows though - suppose you have an options page, it wouldn't be strange to open it separately (via chrome.app.window.create)

如stdob在评论中所述,可以通过将<webview>与分区有幸展示本地资源.尚不清楚是否是否将允许访问应用程序API.

As stdob mentions in comments, a workaround may be possible by using <webview> with a partition blessed to show local resources. It's not clear though if it will allow access to apps APIs.