Answers for "chrome extension open new tab from popup"

0

chrome extension open new tab from popup

document.addEventListener('DOMContentLoaded', () => {
   var y = document.getElementById("index_link");
   y.addEventListener("click", openIndex);
});

function openIndex() {
 chrome.tabs.create({active: true, url: "http://my_url"});
}
Posted by: Guest on September-20-2020
0

chrome extension open new tab from popup

<a id="index_link">My text</a>.
Posted by: Guest on September-20-2020

Code answers related to "chrome extension open new tab from popup"

Browse Popular Code Answers by Language