How can I include a link in a the popup of a google chrome extension?
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).
精彩评论