diff options
author | Charles Emmanuel S. Ndiaye <manusquall@outlook.com> | 2022-02-15 08:03:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-15 09:03:21 +0100 |
commit | 2b8231d4a82eb844adcdae973ecf47c648482991 (patch) | |
tree | cfff9cb6d8a28bfaa4969b8c477e79d7c415e922 /files/fr | |
parent | e7754b8a0961a10a33c34819dbded4147c8aa1cc (diff) | |
download | translated-content-2b8231d4a82eb844adcdae973ecf47c648482991.tar.gz translated-content-2b8231d4a82eb844adcdae973ecf47c648482991.tar.bz2 translated-content-2b8231d4a82eb844adcdae973ecf47c648482991.zip |
fr-web/api/document/scrollingelement id: 3618 (#4150)
* begin #3618 translation
* translate id 3618 in french
* Delete settings.json
* Update link references
Update link references according to sphinx review
Co-authored-by: SphinxKnight <SphinxKnight@users.noreply.github.com>
* forgotten nitpicking
Co-authored-by: SphinxKnight <SphinxKnight@users.noreply.github.com>
Diffstat (limited to 'files/fr')
-rw-r--r-- | files/fr/web/api/document/scrollingelement/index.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/files/fr/web/api/document/scrollingelement/index.md b/files/fr/web/api/document/scrollingelement/index.md new file mode 100644 index 0000000000..eb3ecd1999 --- /dev/null +++ b/files/fr/web/api/document/scrollingelement/index.md @@ -0,0 +1,32 @@ +--- +title: Document.scrollingElement +slug: Web/API/Document/scrollingElement +browser-compat: api.Document.scrollingElement +translation_of: 'Web/API/Document/scrollingElement' +--- +{{APIRef("DOM")}} + +La propriété en lecture seule **`scrollingElement`** de l'interface [`Document`](/fr/docs/web/api/document) renvoie une référence à l'[élément](/fr/docs/web/api/element) qui fait défiler le document. En mode standard, il s'agit de l'élément racine du document, [`document.documentElement`](/fr/docs/web/api/document/documentelement). + +En mode quirks, l'attribut `scrollingElement` renvoie l'élément HTML `body` s'il existe et est [potentiellement défilable](https://drafts.csswg.org/cssom-view/#potentially-scrollable), sinon il renvoie `null`. + +## Syntaxe + +```js +var element = document.scrollingElement; +``` + +## Exemple + +```js +var scrollElm = document.scrollingElement; +scrollElm.scrollTop = 0; +``` + +## Spécifications + +{{Specifications}} + +## Compatibilité du navigateur + +{{Compat}} |