I have a Chrome Extension, so by definition it runs inside the browser. I have been studying some other posts with similar issues:
SecurityError: Blocked a frame with origin from accessing a cross-origin frame
In my extension code I'm doing the following:
var innerDoc = iframe.contentDocument || iframe.contentWindow.document;
In a previous version of Chrome, early in 2018 or maybe going back to 2017, this code worked fine, but now it throws this error:
Uncaught DOMException: Blocked a frame with origin "https://play.google.com" from accessing a cross-origin frame. at eval (eval at getGooglePlayVideoArray (chrome-extension://mabfegpcoejeoliboopmoeoodfiocgcn/js/ZingFilter.js:727:27), :1:22) at getGooglePlayVideoArray (chrome-extension://mabfegpcoejeoliboopmoeoodfiocgcn/js/ZingFilter.js:727:27) at loadVideo (chrome-extension://mabfegpcoejeoliboopmoeoodfiocgcn/js/ZingFilter.js:760:21) at chrome-extension://mabfegpcoejeoliboopmoeoodfiocgcn/js/ZingFilter.js:493:46
What I don't understand is how Chrome can see this as cross-origin given the fact that my extension js is injected right into the browser page. What makes it think it's cross-origin? Is my only solution to resort to this?