开发者

How can I include a link in a the popup of a google chrome extension?

开发者 https://www.devze.com 2023-01-05 06:05 出处:网络
I am experiencing some problems with a google chrome extension I have made. I\'ve put this simple line of code at the top of the popup page:

I am experiencing some problems with a google chrome extension I have made. I've put this simple line of code at the top of the popup page:

<a href="http://www.google.com">google</a>

However, clicking on it yields no results. But I have someone else's extension that includes links in the popu开发者_运维百科p in exactly the same way, and seems to work. Is there a permissions error of some kind here?


Links behave a bit differently in extension popups than they do in ordinary tabs. In a popup, add target="_blank" (or an arbitrarily named target) to your anchor tags or use the tab API’s chrome.tabs.create method (which will require tabs permission in your manifest file).

0

精彩评论

暂无评论...
验证码 换一张
取 消