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

Enable custom childrenKey in rules #8

Closed
doodlewind opened this issue Jan 2, 2018 · 1 comment
Closed

Enable custom childrenKey in rules #8

doodlewind opened this issue Jan 2, 2018 · 1 comment

Comments

@doodlewind
Copy link
Owner

doodlewind commented Jan 2, 2018

In a complex data structure, the fields expressing a node's children may differ in different types of nodes. So it's useful to have each rule specify its childrenKey for traversing. This field is optional, with options.childrenKey as default.

Moreover, the childrenKey API looks verbose, which can be simplified with a better name. For nodes without matched childrenKey, we also need a way handling them.

@doodlewind
Copy link
Owner Author

Consider mirroring $element.childNodes in DOM, it's reasonable to favor childKey over childrenKey.

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

No branches or pull requests

1 participant