Hello, there is an extension for Firefox, the contentz.js file (content script) contains the following code that runs on the page - https://aliexpress.ru/wholesale?catId=0&initiative_id=SB_20200418035153&SearchText=power+bank
var lock = false;
window.onload = async function() {
if (!lock) {
lock = true;
emulate();
}
}
async function emulate() {
var urlz = “https://aliexpress.ru/item/4000409895804.html”;
var promise1 = new Promise(function(resolve, reject) {
newWin = window.open(urlz , “hello”, “width=800,height=600”);
newWin.addEventListener(“load”, analyze_it); //eventlistener
function analyze_it() {
alert(“test”);
resolve(“Success!”);
}
})
}
everything works fine in the Chrome browser, in Firefox, the event does not work, a message is displayed in the console - “Permission denied to access property “addEventListener” on cross-origin object”, when trying to access any element of the child window, a similar error is also displayed. What’s the matter? After all, the domains at the parent and child windows are the same.