/grepNodes

iteratively binary search in dom for text using a string or regex and get the nodes containing it. avoid 'Maximum call stack size exceeded'!

Primary LanguageJavaScript

iteratively binary search in dom for text using a string or regex and get the nodes containing it. 
avoid 'Maximum call stack size exceeded'!

Worst case performance  O(log n)
Best case performance	O(1)
Average case performance	O(log n)
Worst case space complexity	O(1)

there's probably a better algorithm for this.