sjohnsonaz / BuildJS-Full

A simple utility for class definition, inheritance, dynamic loading, MVVM, Widgets, and backend MVC.
http://buildjs.com
0 stars 0 forks source link

Change Widget.addChild method to test for parent in the new element. #9

Closed sjohnsonaz closed 9 years ago

sjohnsonaz commented 10 years ago

The DOM specification states that Elements can only be added to a single parent. Thus, when changing parents, it removes it from the existing parent.

However, in the current Widget scheme, a Widget may be added to multiple parents simultaneously, although the underlying DOM relationships will obviously hold to the DOM specification. Thus, we must apply similar logic to the Widget scheme.

sjohnsonaz commented 9 years ago

This needs to be implemented in Container and Switcher.

sjohnsonaz commented 9 years ago

Implemented in Container. Switcher still needs its childrenHandler updated to be more efficient, but the same testing is implemented.