aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/document/getselection/index.html
blob: 9a2aab76d5a41de2b0c48deb7b655dbbb7071247 (plain)
1
2
3
4
5
6
7
8
---
title: Document.getSelection()
slug: Web/API/Document/getSelection
translation_of: Web/API/DocumentOrShadowRoot/getSelection
---
<p>{{APIRef("DOM")}}</p>

<p>Esse método funciona de forma idêntica ao método {{domxref("Window.getSelection()")}};  Ele retorna um objeto {{domxref("Selection")}} representando o texto atualmente selecionado no documento.</p>