Creating messageHandlers
This commit is contained in:
14
home.js
14
home.js
@@ -1,9 +1,17 @@
|
||||
window.onload = run;
|
||||
function run()
|
||||
{
|
||||
document.getElementById("id_run").addEventListener("click", function(e){
|
||||
console.log("triggered!!");
|
||||
alert("judihudi");
|
||||
console.log("triggered!!");
|
||||
alert("judihudi");
|
||||
startBackgroundScript();
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
window.onload = run;
|
||||
|
||||
|
||||
function startBackgroundScript()
|
||||
{
|
||||
browser.runtime.sendMessage("Button_clicked");
|
||||
console.log("home.js sent button_clicked message...");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user