Reply to: What is selectedMay 6, 2009 at 1:32 pm
It seems that it's not that simple. Selection.ContainerNode does not give you the current node, as the documentation states, it gives you the selection's container.
Consider this example:
When the user has the second Child element (child 2) selected how can I figure that out. When I use Selection.ContainerNode it returns the Parent element. Using DOM from there will allow me to navigate to the Child nodes but how do I know which one is selected.
I agree I can change the selection using the Selection API but how will it help me figure out which Child element is selected.