I’m developing a chrome extension where I need to create dynamic sub-contextMenus based on some selected text. Like If you select a text, it’ll send an ajaxrequest from the background.html and create some child context menu based on the returned results. Is that possible? I’ve been trying for sometime. But no luck.
I’m developing a chrome extension where I need to create dynamic sub-contextMenus based on
Share
You can add right mouse button event listener in a content script:
There is also
oncontextmenuevent, can try it as well (I thinkmousedownis fired earlier though).