Created
May 6, 2015 15:38
-
-
Save yzen/90a6511b4dce74bcc87e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var textPosition = new AccPos(domTextArea.accesibleElement, 'at'); | |
// Read word by word | |
var word1 = textPosition.move('forward', 'word'); | |
var word2 = word.move('forward', 'word'); | |
var text = word2.textInBetween(word1); | |
var text = word1.findText('forward', 'paragraph'); | |
while(word) { | |
console.log(word.anchor.value); | |
word = word.move('forward', 'word'); | |
} | |
function search(acc) { | |
switch(acc.role) { | |
default: | |
return 'beforeend'; | |
break; | |
} | |
} | |
var pos = new AccPos(document.accEl, 'afterbegin') | |
console.log(pos.anchor); // document.accEl | |
function moveForward(pos) { | |
return pos.move('forward', search); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment