Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8099761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:31:02+00:00 2026-06-05T22:31:02+00:00

Is there a way in knockout.js to determine which values ( ko.observable or ko.computed

  • 0

Is there a way in knockout.js to determine

  • which values (ko.observable or ko.computed) depend on each other in what way (precedents/dependents) and
  • which HTML nodes (text binding, for starters) depend on the current value1, so I can highlight them on screen.

?

1 This implies that I need a way to go from an HTML node to the connected ko.subscribable, not just to the view model, like ko.dataFor() does. This seems to be impossible as well.


I’ve built a web application that works like a spreadsheet – many numeric values that are based on each other according to a set of business rules. Some of them are calculated, some of them user-provided.

At the moment I’m using my own JS library that does all the dependency tracking and dynamic screen-updating. This works, but I’d like to swap it with knockout.js for added versatility and elegance.

Knockout keeps track of this information somewhere. How can I use it?


For example, imagine a spreadsheet (an HTML table) that sums up a few integers:

  | A  B  C
--+---------
1 | 4  1  5
2 |    2
3 |    3  8
  • When the user clicks on cell B3, I’d like to find out that it depends on B1 and B2 and that C3 depends on it.
  • When the user clicks on cell C3, I’d like to find out that it depends on A1, B1, C1, B2 and B3.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:31:04+00:00Added an answer on June 5, 2026 at 10:31 pm

    I have written a plugin for Knockout (2.0+) whose primary purpose is eliminating duplicate updates for computed observables. But since the plugin replaces the ko.computed object, I have also added the ability to get a list of the dependencies/dependents for observables. Each computed object has a getDependencies method that returns an array of observables, and each observable/computed observable has a getDependents method that returns an array of computed observables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way in which I can automatically convert a Custom Class Object
Is there way to find out if Java is running on a platform which
Is there any way I can use knockout js in Dynatree ? If anyone
Is there way to overwrite the default values for internationalization? Example if I get
Is there a way to get a list of variables in a knockout model
I'm looking for the best way to initialize a knockout observable array from some
Is there a way to get knockout to ignore the bindings even though apply
Is there an easy way to tell knockout to bind the selected value of
Is there way to get file from windows xp command prompt? I tried to
Is there way to automatically maximize the output window on hitting build and then

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.