aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/documentorshadowroot/getselection/index.html
blob: 9352399ada1fc0c9f55a0fd1afb835220045c9d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
title: document.getSelection
slug: Web/API/Document/getSelection
tags:
  - API
  - DOM
  - Méthodes
  - Reference
  - Selection
translation_of: Web/API/DocumentOrShadowRoot/getSelection
translation_of_original: Web/API/Document/getSelection
---
<p>{{APIRef("DOM")}}</p>

<p><span id="result_box" lang="fr"><span>Cette méthode fonctionne de manière identique à la méthode {{domxref ("Window.getSelection()")}} ;</span> elle<span> renvoie un objet {{domxref ("Selection")}} représentant le texte actuellement sélectionné dans le document.</span></span></p>