Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"});
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #chrome #extension #open #tab #popup
ADD COMMENT
Topic
Name
8+1 =