add `node.getAllAncestorsAtRange` method
See original GitHub issueDo you want to request a feature or report a bug?
Feature.
What’s the current behavior?
Right now you have to manually iterate the blocks
and look up each of their ancestors, and then make sure you convert it to a set to remove duplicates.
What’s the expected behavior?
It would be nice to have a getAllAncestorsAtRange
method that returned all of the ancestors in the range exactly once, so you can more easily find wrapping parents of certain types.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Node (jsoup Java HTML Parser 1.15.3 API)
To get an absolute URL from an attribute that may be a relative URL, prefix the key with abs , which is a...
Read more >Adding Nodes to the DOM with JavaScript - YouTube
In this excerpt from the JavaScript for WordPress Master Course, educator, Zac Gordon, walks through how to get up and running with adding...
Read more >Python & Nodes in Houdini || Exploring Houdini - YouTube
Using Python, you can navigate all the nodes in your project. You can also create new nodes, change parameters, and wire nodes together...
Read more >Using the Node-Red Function Node- Beginners Guide
The function node is used to run JavaScript code. The function node accepts a msg object as input and can return 0 or...
Read more >Writing Node.js in Steps - Pipedream
You can add any Node.js code in the editor that appears. For example, try: ... When the step runs, Pipedream executes the run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds good @ianstormtaylor, I’ll jump on this next.
The
getContainedXAtRange
methods do definitely feel like they could be useful for a lot of use cases. I do think though that we should create a separate issue for those to not spread this issue too wide.Sounds good @ianstormtaylor, lets go with
Root/Leaf
then.For the
All
, I think it works either way (I think I’m leaning more towards without theAll
tbh) but just so we could deprecate the existing methods (getBlocksAtRange
, etc). If we prefer without theAll
, we could remove it later with another deprecation period.I could also skip any changes to the current API methods and just add the
getNodesAtRange
for now?