Elementals.js

Latest Version: 3.0 RC 1 17 July 2017

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