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

Expose DOM nodeRactive info in public API - RFC #1509

Merged
merged 3 commits into from
Nov 29, 2014

Conversation

evs-chris
Copy link
Contributor

I had occasion to use this today, so here is an implementation as described in @martpdx's comment in #1217. Having .parent, .container, and friends make this even more useful.

Indices don't currently propagate through to component nodes nicely, but #1474 should take care of that.

This fixes #1217.

@Rich-Harris
Copy link
Member

👍 Definitely makes sense to have this as a static method, and returning a fresh object rather than node_ractive ought to prevent footgun-related accidents

@evs-chris
Copy link
Contributor Author

ought to prevent footgun-related accidents

"When JavaScript is your hammer, everything looks like a thumb."

The last commit adds support for indices that exist beyond (non-isolated) component boundaries. If everything looks ok, it's ready to merge.

Rich-Harris added a commit that referenced this pull request Nov 29, 2014
Expose DOM nodeRactive info in public API - RFC
@Rich-Harris Rich-Harris merged commit f814dd4 into ractivejs:dev Nov 29, 2014
@Rich-Harris
Copy link
Member

LGTM. Nice one

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

Successfully merging this pull request may close these issues.

Decorators Accessing Privates
2 participants