Hello,
I'm getting ready to migrate my extension to MV3 and I wanted to check about an odd behavior. In my manifest, I have requested all_urls
`{... host_permissions: ["<all_urls>"] } `
In the background script, I inject a very small content script that checks for a property in the head of the document and returns a response:
const results = await chrome.scripting.executeScript({
target: { tabId: <tabId> },
func: () => !!document.head.querySelector(<selector>),
});
This code executes as expected but prints a red console error: "Error: Cannot access contents of the page. Extension manifest must request permission to access the respective host."
Is this expected? Can I safely swallow the error since the code gets executed? Any chance this has to do with injecting using the `func` option rather than the `files` option? (I ask this last question because I am also injecting files but they seem not to throw the error)
Thanks