Lets say we have a menu item.
myMenuItem = chrome.contextMenus.create({
id: "newItemId",
title: "New menu entry",
contexts: ["all"]
});
Is the following if statement a valid method for checking if the menu item exists before removing it, in order to prevent errors?
if (myMenuItem === "newItemId")