Posted by flexo on Thu 26th Apr 06:35
download | new post
- walk: while (node != this.t2.parentNode) {
- /* Walk the DOM up ... */
- while(!node.nextSibling) {
- node = node.parentNode;
- assert(node);
- }
- /* ... forward (skipping ghost elements) ... */
- do {
- if(!node.nextSibling)
- continue walk;
- node = node.nextSibling;
- assert(node);
- } while(isGhost(node));
- /* ... and down again. */
- while(!isInline(node)) {
- node = node.firstChild;
- assert(node);
- }
- ret.push(node);
- }
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.