Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Array.observe #10

Closed
MaxArt2501 opened this issue Aug 2, 2015 · 3 comments
Closed

Implement Array.observe #10

MaxArt2501 opened this issue Aug 2, 2015 · 3 comments
Labels

Comments

@MaxArt2501
Copy link
Owner

Based on the spec.

Basically, it's a matter to implement the detection of the splice event inside the dirty checking loop. Array.unobserve should behave just like Object.unobserve.

@MaxArt2501 MaxArt2501 changed the title Implementing Array.observe Implement Array.observe Aug 2, 2015
@tomalec
Copy link

tomalec commented Aug 6, 2015

👍 Do you have any plan for this?

@MaxArt2501
Copy link
Owner Author

In fact, I do.
It's not a problem of detecting "splice" changes - a distance function (such as Levenshtein's) should do the trick - but a matter of implementation strategy. Detecting splices is a computationally hefty operation that should be done only for Array-like objects that are observed for splice changes. All of these tasks and checks have their computational cost.

I'd like to prioritize adding benchmarks (#11) before this one, and hopefully something should move as soon as I go on a break and have a little time for my projects.

@MaxArt2501
Copy link
Owner Author

In the meanwhile, I created a separate polyfill for Array.observe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants