aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/document/getselection/index.html
blob: e5ce193c90f7838d426fe48da930c3ad3cacd641 (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>Этот метод работает в точности так же, как {{domxref("Window.getSelection()")}}; он возвращает объект {{domxref("Selection")}}, в котором содержатся данные о тексте, выделенном в документе на данный момент.</p>