Yes, in CV we build up a path to an element using a real xhtml parser. Each element of the path is the node name and its child number (only counting elements not text children). With this path we sync PV.
In PV we get the current caret of any text selection using document.getSelection to get the text node and walk up the dom recording its path (parent element and index of child in node (only counting element children)). This path is then sent to CV which uses an xhtml parser of its current contents to find the location.
So CV positions will get you to any element. But PV positions can only be recorded for its selected (clicked in) text.
It has always been like that.
|