Created
June 3, 2015 23:52
-
-
Save srolel/9def16b61893809eee25 to your computer and use it in GitHub Desktop.
angular depth-first scope traverse from `Scope.$digest`
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
let next, current = root, target = root | |
do { | |
console.log(current.$$watchers) | |
if (!(next = ((current.$$watchers.length && current.$$childHead) || | |
(current !== target && current.$$nextSibling)))) { | |
while (current !== target && !(next = current.$$nextSibling)) { | |
current = current.$parent; | |
} | |
} | |
} while ((current = next)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment