angular/angular.js — pull request #1725 by petebacondarwin (2012-12-18 20:49:29+00:00)
Title: fix(jqLite): children() should only return elements.

The jQuery implementation of `children()` only returns child nodes of the given element that are elements themselves. The previous jqLite implementation was returning all nodes except those that are text nodes.

[One should use `jQLite.contents()` to get all the child nodes]

The testabilityPatch was incorrectly using `children()` rather than `contents()` inside `cleanup()` to iterate down through all the child nodes of the element to clean up.

The *"bind should bind to window on hashchange"* jqLiteSpec had not defined a `childNodes` property when it was mocking out the `window` object, so `contents()` was blowing up with a stack overflow in that test.

This fixes https://github.com/angular/angular.js/issues/1413