MDN self-hosted library · e01.org

Window: length property

HTML DOM

Open notebook · 1 cells web-api-instance-property upstream source

HTML DOM

The length read-only property of the Window interface returns the number of frames (either frame or iframe elements) in the window.

Value

A number.

Examples

if (window.length) {
  // this is a document with subframes
}

Specifications

Browser compatibility