var e = document.createEvent('MouseEvents');
e.initEvent("click", true, true);
anchorElement.dispatchEvent(e);
This logic is failing in manifest v3 when the anchorElement is having href="javascript:somefn()"
Error -
"Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:* chrome-extension://a73b45f5-7ff8-4128-aab0-c4fa855a9faa/". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present."
Content Script Policy:-
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'"
},
Could you please help?