Skip to content Skip to sidebar Skip to footer

Chrome Extension > ContextMenus Api > Can Not Add Onclick Handler

I am trying to create a chrome extension. Currently I am about to create context menu for my extension, which will do something when I click on it. So, following google documentati

Solution 1:

Event based background pages (persistent=false) have to use chrome.contextMenus.onClicked listeners.

chrome.contextMenus.create({...});
chrome.contextMenus.onClicked.addListener(function(info, tab) {
    alert("bla bla bla");
});

Post a Comment for "Chrome Extension > ContextMenus Api > Can Not Add Onclick Handler"