I am writing a chrome extension with the new manifest v3.
The extension injects DOM element to the document's body (Popup helper for the selected text).
It works great with any site, but it doesn't work when the page is actually a PDF viewer extension of chrome.
Selecting the pdf's text is one problem but, the main problem is that the injection logic of the new DOM isn't working on the PDF viewer's DOM.
Is there any new restrictions in manifest v3? I see many chrome extensions succeed to do so with manifest 2.
My injection logic is simple document.body.append
in the callback of document.addEventListener('mouseup', callback)
.
The code lives in my content_script.js
.
The content script & background script seems to be running as expected in the PDF viewer context.
Maybe the document
is not the PDF viewer's document
somehow...
Any ideas?