This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Document.getSelection()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2017년 11월⁩.

이 메소드는 Window.getSelection() 와 동일합니다. 이 메소드는 Selection 형의 객체를 반환하는데, 이 객체는 현재 페이지에서 선택된 영역의 정보를 반영합니다.