Permalink
Browse files

update docco docs

  • Loading branch information...
1 parent cf66641 commit d9d29df491cdfd881df4ed3bc27596c9d946fb1f @robrobbins robrobbins committed Apr 7, 2013
View
@@ -425,10 +425,11 @@ sudo.Container.prototype.removeChild = function removeChild(arg) {
};
// ###removeChildren
-// Remove all children, removing the name references and index
-// This method calls removeFromParent on each child. If it's a DataView also removes the child's DOM.
-// `returns` {Object} `this`
-sudo.Container.prototype.removeChildren = function removeChildren(arg) {
+// Remove all children, name references and adjust indexes accordingly.
+// This method calls removeFromParent as each child may have overridden logic there.
+//
+// `returns` {object} `this`
+sudo.Container.prototype.removeChildren = function removeChildren() {
while(this.children.length) {
this.children.shift().removeFromParent();
}
@@ -452,6 +453,9 @@ sudo.Container.prototype.role = 'container';
// What this does is allow children of a `sudo.Container` to simply pass
// events upward, delegating the responsibility of deciding what to do to the parent.
//
+// TODO Currently, only the first target method found is called, then the
+// bubbling is stopped. Should bubbling continue all the way up the 'chain'?
+//
// `param` {*} Any number of arguments is supported, but the first is the only one searched for info.
// A sendMethod will be located by:
// 1. using the first argument if it is a string
View
@@ -88,10 +88,11 @@ sudo.Container.prototype.removeChild = function removeChild(arg) {
};
// ###removeChildren
-// Remove all children, removing the name references and index
-// This method calls removeFromParent on each child. If it's a DataView also removes the child's DOM.
-// `returns` {Object} `this`
-sudo.Container.prototype.removeChildren = function removeChildren(arg) {
+// Remove all children, name references and adjust indexes accordingly.
+// This method calls removeFromParent as each child may have overridden logic there.
+//
+// `returns` {object} `this`
+sudo.Container.prototype.removeChildren = function removeChildren() {
while(this.children.length) {
this.children.shift().removeFromParent();
}
@@ -115,6 +116,9 @@ sudo.Container.prototype.role = 'container';
// What this does is allow children of a `sudo.Container` to simply pass
// events upward, delegating the responsibility of deciding what to do to the parent.
//
+// TODO Currently, only the first target method found is called, then the
+// bubbling is stopped. Should bubbling continue all the way up the 'chain'?
+//
// `param` {*} Any number of arguments is supported, but the first is the only one searched for info.
// A sendMethod will be located by:
// 1. using the first argument if it is a string
Oops, something went wrong.

0 comments on commit d9d29df

Please sign in to comment.