Window: frameElement-Eigenschaft
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Die Window.frameElement
-Eigenschaft gibt das Element zurück (wie <iframe>
oder <object>
), in dem das Fenster eingebettet ist.
Wert
Beispiele
js
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/";
}
Spezifikationen
Specification |
---|
HTML # dom-frameelement-dev |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
frameElement |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Siehe auch
window.frames
gibt ein Array-ähnliches Objekt zurück, das die direkten Unterrahmen des aktuellen Fensters auflistet.window.parent
gibt das übergeordnete Fenster zurück, welches das Fenster enthält, das dasframeElement
des Unterfensters ist.