In https://github.com/mozilla-b2g/gaia/pull/8742 @sergi mentioned that `firstChild` might be less expensive, which prompted me to get some evidence. Turns out there is a perf benefit on Firefox[0], so I recommend updating to `while (node.firstChild)` 

[0] http://jsperf.com/child-removal-deathmatch/2