//I'm trying to reproduce the example of context menus with the following code (taken from MDN).
browser.contextMenus.create({
id: "log-selection",
title: "Log '%s' to the console",
contexts: ["selection"]
});
browser.contextMenus.onClicked.addListener(function(info, tab) {
if (info.menuItemId == "log-selection") {
console.log(info.selectionText);
}
});
The problem is I can not see the logs in any kind of console: not in the Web console nor the navigator console (opened through the debugging button I about:debugging
). So, where should I see the logs?