Add TODOs about not returning -1 for undefined.

This commit is contained in:
Jürg Lehni 2011-04-27 17:53:59 +01:00
parent 4bfc56bb6d
commit 6b6f27cb6e
2 changed files with 2 additions and 0 deletions

View file

@ -252,6 +252,7 @@ var Item = this.Item = Base.extend({
// TODO: Relying on indexOf() here is slow, especially since it is
// used for getPrevious/NextSibling().
// We need linked lists instead.
// TODO: Return null instead of -1?
return this.parent ? this.parent.children.indexOf(this) : -1;
},

View file

@ -98,6 +98,7 @@ var Segment = this.Segment = Base.extend({
getIndex: function() {
// TODO: Cache and update indices instead of searching?
// TODO: Return null instead of -1?
return this._path ? this._path._segments.indexOf(this) : -1;
},