ibm-js/delite — pull request #273 by wkeese (2014-09-08 12:01:56+00:00)
Title: Make appendChild() and insertBefore() work on this.containerNode

#168 essentially replaced the custom addChild() method with the standard appendChild and insertBefore() methods. But the problem is that it only works when this.containerNode is unset (or points to the root node). In other words, for a widget like dijit/layout/TabContaienr, appendChild() won't do what apps expect.

This PR makes appendChild() and insertBefore() work on this.containerNode rather than widget root node (unless this.containerNode is undefined).

But this **only applies after widget creation finishes, because buildRendering()
needs access to the real appendChild() method**.

Unfortunately it's a leaky abstractions because things like `myWidget.children` list the children of the widget root node, rather than myWidget.containerNode, and similarly `myWidget.innerHTML = ...` will clear everything under the root node instead of just the stuff under the container node. I tried to use Object.defineProperty() to make innerHTML and .children work on this.containerNode, but Safari won't allow it.

Refs #168 and also #247.