I\'m trying to get all the DOM nodes that are within a range object, what\'s the best way to do this?
var selection = window.getSelection(); //what the user
bob. the function only returns the startNode and endNode. the nodes in between do not get pushed to the array.
seems the while loop returns null on getNextNode() hence that block never gets executed.