MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/8d22564490d8

Document.getSelection()

This method functions identically to the Window.getSelection() method; it returns a Selection object representing the text currently selected in the document.

Document Tags and Contributors

 Contributors to this page: teoli, Sheppy, kscarfone, Khodaidad_Basharmand, ethertank, RobG
 Last updated by: teoli,