Pass ClosureCompiler tests

PTAL
How about?

var child;
while (child = node.firstChild)
  context.appendChild(newNode, child)