knockout icon indicating copy to clipboard operation
knockout copied to clipboard

Add ko.computedContext to replace/supplement ko.dependencyDetection and more

Open mbest opened this issue 12 years ago • 0 comments

ko.computedContext can include some public functions such as

  • getDependencyCount - return number of dependencies so far in current evaluation. see knockout/knockout#627
  • isDependency - return whether an observable is a dependency in current evaluation
  • isInitial - is this the first evaluation of the computed?
  • didChange - if the given observable was previously a dependency, return whether this evaluation was due to a change in that observable (only really useful when the computed is used as a reactor) see #22
  • computed - the current computed observable

mbest avatar Nov 19 '13 09:11 mbest