aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/document/getselection/index.html
blob: 2f523757990a5447bc05b2ea641ebe31d401322b (plain)
1
2
3
4
5
6
7
8
9
---
title: Document.getSelection()
slug: Web/API/Document/getSelection
translation_of: Web/API/DocumentOrShadowRoot/getSelection
translation_of_original: Web/API/Document/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>