Looking at barbazs problem viewtopic.php?f=27&t=26485#p104794
I see that window.frames is not a list of frame elements but list of content windows, which is NOT patched by modifyWindow!
So adding:
Code: Select all
function modifyWindowFramesList(win) {
let descriptor = Object.getOwnPropertyDescriptor(win, "frames");
let origGetter = descriptor.get;
function frames() {
let frames = origGetter.call(this);
for (let i = 0; i < frames.length; i++) {
let frameWin = frames[i];
if (frameWin && frameWin instanceof Window) modifyWindow(frameWin);
}
return frames;
}
descriptor.get = exportFunction(frames, win, {defineAs: `get frames`});
Object.defineProperty(win, "frames", descriptor);
}