I am currently writing a google chrome extension. I'd like to add a new menu item with sub-menu items under it, on the google document's context menu using chrome extension. How can I achieve this using content_script from a chrome.
I have already looked at this SO question and was successful in adding the top-level menu item. But I now need sub-menu items under it. I looked at the HTML elements using dev-tools by hovering over the Formatting Options menu, which has sub-menu:
But the sub-menu item seems to be wrapped in its own div element and couldn't quite figure out how it is linked to its parent menu.
