Current URL in Safari Extension

余生长醉 提交于 2020-01-14 07:37:11

问题


safari.application.activeBrowserWindow.activeTab.url is always undefined.

Any idea why this might be?


回答1:


My impression is that this happens when the loaded page is not “allowed” in the Extension Website Access section of the extension’s configuration.

Only the websites you choose have web content injected into them, and only those websites can be manipulated using the tab object’s properties, such as title and url.

Also, it seems that the Whitelist and Blacklist settings are applied “on top of” whatever is allowed by Extension Website Access.

First, access is limited by the Extension Website Access settings, then the whitelist and blacklist are applied.



来源:https://stackoverflow.com/questions/8140730/current-url-in-safari-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!