Namespace: ui

ui

Methods

(static) selectElementText(el, win)

Selects all text in the element `el` visually as though selected with the mouse, to be ready for copying or something like that.
Parameters:
Name Type Description
el DOMElement the DOM element in which to select the text.
win Window @optional the relevant browsing context.
Source:
Example
sputils.selectElementText(document.querySelector('#container));