A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/Window/frameElement below:

Window: frameElement property - Web APIs

Window: frameElement property

Baseline Widely available

The Window.frameElement property returns the element (such as <iframe> or <object>) in which the window is embedded.

Note: Despite this property's name, it works for documents embedded within any embedding point, including <object>, <iframe>, or <embed>.

Value

The element which the window is embedded into. If the window isn't embedded into another document, or if the document into which it's embedded has a different origin, the value is null instead.

Examples
const frameEl = window.frameElement;
// If we're embedded, change the containing element's URL to 'https://mozilla.org/'
if (frameEl) {
  frameEl.src = "https://mozilla.org/";
}
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4