Node.descendants() doc update request

@marijn The docs for Node.descendants() don’t provide info on the pos or index params. I spent several hours today trying to work out how to get the position of the node and it wasn’t until I stumbled upon your comment “It’s local to the node you called descendants on, which I guess would be the document.” here that the penny dropped.

Once I saw this it was as simple as adding the initial pos to the pos passed to the Node.descendants() callback to get the node pos.

So could you please mention that pos is local to the node you called descendants on in the doc’s.

Thanks in advance.

1 Like

Added a note on that in this patch.

@marijn Thanks.