- chrome.tabs.create: on main script
- chrome.tabs.sendRequest: on main script
- chrome.extension.onRequest: on new tab
Take a look at the API doc for more info:
Main script
chrome.tabs.create({url: "NewTabView.html"}, function (tab) { // Callback function is called when tab is created. chrome.tabs.sendRequest(tab.id, {content: "hello tab"} ); });
NewTabView.html
No hay comentarios:
Publicar un comentario