Window frame

Welcome to Window frame

Window: frames property - Web APIs | MDN

2024.05.10 22:19

Skip to main content Skip to search Skip to select language Open main menu References References Overview / Web Technology

Web technology reference for developers


Structure of content on the web


Code used to describe document style


General-purpose scripting language


Protocol for transmitting web resources

Web APIs

Interfaces for building web applications

Web Extensions

Developing extensions for web browsers

Web Technology

Web technology reference for developers

Guides Guides Overview / MDN Learning Area

Learn web development

MDN Learning Area

Learn web development


Learn to structure web content with HTML


Learn to style content using CSS


Learn to run scripts in the browser


Learn to make the web accessible to all

Plus Plus Overview

A customized MDN experience

AI Help (beta)

Get real-time assistance and support


All browser compatibility updates at a glance


Learn how to use MDN Plus


Frequently asked questions about MDN Plus

Curriculum New Blog Play AI Help Beta Theme Log in Sign up for free References Web APIs Window frames Article Actions English (US) Français 日本語 Русский 中文 (简体) Filter sidebar Clear filter input

In this article

Value Examples Specifications Browser compatibility Document Object Model Window Instance properties closed console cookieStore Experimental credentialless Experimental crossOriginIsolated customElements devicePixelRatio document documentPictureInPicture Experimental event Deprecated external Deprecated fence Experimental frameElement frames fullScreen Non-standard history indexedDB innerHeight innerWidth isSecureContext launchQueue Experimental length localStorage location locationbar menubar mozInnerScreenX Non-standard mozInnerScreenY Non-standard name navigation Experimental navigator opener orientation Deprecated origin originAgentCluster Experimental outerHeight outerWidth parent performance personalbar screen screenLeft screenTop screenX screenY scrollbars scrollMaxX Non-standard scrollMaxY Non-standard scrollX scrollY self sessionStorage sharedStorage Experimental sidebar Non-standard Deprecated speechSynthesis status Deprecated statusbar toolbar top visualViewport window Instance methods alert() back() Non-standard Deprecated blur() Deprecated cancelAnimationFrame() cancelIdleCallback() captureEvents() Deprecated clearImmediate() Non-standard Deprecated close() confirm() dump() Non-standard find() Non-standard focus() forward() Non-standard Deprecated getComputedStyle() getDefaultComputedStyle() Non-standard getScreenDetails() Experimental getSelection() matchMedia() moveBy() moveTo() open() postMessage() print() prompt() queryLocalFonts() Experimental releaseEvents() Deprecated requestAnimationFrame() requestFileSystem() Non-standard Deprecated requestIdleCallback() resizeBy() resizeTo() scroll() scrollBy() scrollByLines() Non-standard scrollByPages() Non-standard scrollTo() setImmediate() Non-standard Deprecated setResizable() Non-standard Deprecated showDirectoryPicker() Experimental showModalDialog() Non-standard Deprecated showOpenFilePicker() Experimental showSaveFilePicker() Experimental sizeToContent() Non-standard stop() updateCommands() Non-standard webkitConvertPointFromNodeToPage() Non-standard Deprecated webkitConvertPointFromPageToNode() Non-standard Deprecated Events afterprint appinstalled beforeinstallprompt beforeprint beforeunload blur copy cut devicemotion deviceorientation deviceorientationabsolute error focus gamepadconnected gamepaddisconnected hashchange languagechange load message messageerror offline online orientationchange Deprecated pagehide pageshow paste popstate rejectionhandled resize storage unhandledrejection unload Deprecated vrdisplayactivate Non-standard Deprecated vrdisplayconnect Non-standard Deprecated vrdisplaydeactivate Non-standard Deprecated vrdisplaydisconnect Non-standard Deprecated vrdisplaypresentchange Non-standard Deprecated Inheritance EventTarget Related pages for DOM AbortController AbortSignal AbstractRange Attr CDATASection CharacterData Comment CustomEvent DOMError Deprecated DOMException DOMImplementation DOMParser DOMPoint DOMPointReadOnly DOMRect DOMTokenList Document DocumentFragment DocumentType Element Event EventTarget HTMLCollection MutationObserver MutationRecord NamedNodeMap Node NodeIterator NodeList ProcessingInstruction Range StaticRange Text TextDecoder TextEncoder TimeRanges TreeWalker XMLDocument

In this article

Value Examples Specifications Browser compatibility

Window: frames property

Returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.


A list of frame objects. It is similar to an array in that it has a length property and its items can be accessed using the [i] notation.

frameList === window evaluates to true. Each item in the window.frames pseudo-array represents the Window object corresponding to the given frame 's or iframe 's content, not the frame or iframe DOM element (i.e., window.frames[0] is the same thing as document.getElementsByTagName("iframe")[0].contentWindow ). For more details about the returned value, refer to this thread on .


js 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" ; }


Specification HTML Standard
# dom-frames-dev

Browser compatibility

BCD tables only load in the browser

Help improve MDN

Was this page helpful to you? Yes No Learn how to contribute .

This page was last modified on Apr 8, 2023 by MDN contributors .

View this page on GitHub • Report a problem with this content

Your blueprint for a better internet.

MDN on Mastodon MDN on X (formerly Twitter) MDN on GitHub MDN Blog RSS Feed


About Blog Careers Advertise with us


Product help Report an issue

Our communities

MDN Community MDN Forum MDN Chat


Web Technologies Learn Web Development MDN Plus Hacks Blog Website Privacy Notice Cookies Legal Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation .
Portions of this content are ©1998– 2024 by individual contributors. Content available under a Creative Commons license .

Vivamus fermentum nibh