|
|
@@ -126,17 +126,13 @@ |
|
|
function Context(view, parent) { |
|
|
function Context(view, parent) { |
|
|
this.view = view; |
|
|
this.view = view; |
|
|
this.parent = parent; |
|
|
this.parent = parent; |
|
|
this.clearCache(); |
|
|
|
|
|
|
|
|
this._cache = {}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Context.make = function (view) { |
|
|
Context.make = function (view) { |
|
|
return (view instanceof Context) ? view : new Context(view); |
|
|
return (view instanceof Context) ? view : new Context(view); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
Context.prototype.clearCache = function () { |
|
|
|
|
|
this._cache = {}; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Context.prototype.push = function (view) { |
|
|
Context.prototype.push = function (view) { |
|
|
return new Context(view, this); |
|
|
return new Context(view, this); |
|
|
}; |
|
|
}; |
|
|
|