Window.frameElement
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.
La propriété Window.frameElement
renvoie l'élément (tel que <iframe>
ou <object>
) dans lequel la fenêtre est intégrée.
Syntaxe
js
const frameEl = window.frameElement;
Valeur
Exemple
js
const frameEl = window.frameElement;
// Si nous sommes incorporés, modifiez l'URL de l'élément contenant en 'http://mozilla.org/'
if (frameEl) {
frameEl.src = "http://mozilla.org/";
}
Spécifications
Specification |
---|
HTML # dom-frameelement-dev |
Compatibilité des navigateurs
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.
Voir aussi
window.frames
renvoie un objet de type tableau, listant les sous-cadres directs de la fenêtre courante.window.parent
renvoie la fenêtre parente, qui est la fenêtre contenant leframeElement
de la fenêtre enfant.