// Moving across a line break only counts as moving one character in a TextRange, whereas a line break in// the textarea value is two characters. This function corrects for that by converting a text offset into a// range character offset by subtracting one character for every line break in the textarea prior to the* The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.* * E:checked E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)* Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).* Selects a single *direct* child based on the passed CSS selector (the selector should not contain an id).* Walks up the dom looking for a parent node that matches the passed simple selector (e.g. 'div.some-class' or 'span:first-child').