Elementals.js

Latest Version: 3.7 Final 20 December 2018

Method _.Select.node

Calling Convention:
_.Select.node(Element)
Parameters:
Element
The element you want to select the contents of. This will be performed using either document.body.createTextRange or window.getSelection as appropriate to the browser in use.
Returns:
Nothing

Example

JavaScript

var sampleCode = document.getElementById('sampleCode');
_.Select.node(sampleCode);

The contents of #sampleCode will behave as if you selected them with the mouse.

Advertisement