Window.length

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

Specification
HTML Standard
# dom-length-dev

Browser compatibility

BCD tables only load in the browser