const frames = window.frames; // or const frames = window.parent.frames;
for (let i = 0; i < frames.length; i++) {
// do something with each subframe as frames[i]
frames[i].document.body.style.background = "red";
}Window: frames property / notebook
Window: frames property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.