/1-loc
/DOM
GitHub 6284★
Get the selected text
JavaScript version
const
getSelectedText
=
(
)
=>
window
.
getSelection
(
)
.
toString
(
)
;
Get all siblings of an element
Get the position of an element relative to the document
Follow me on
Twitter
and
GitHub
to get more useful contents.