views:

98

answers:

0

I may be asking the impossible, but, how do I surroundContents on a document-fragment node?

My thoughts (which I'd appreciate feedback on), are as follows: Is the solution to close the fragmentation? If that's it, is there some way to detect if the starting node and ending node don't have opening and closing tags?

I'm running into the javascript error when I attempt to highlight multiple nodes on the below page (which attempts to turn the selection into a range, and then surroundContents it).: http://www.latentmotion.com/insertNode/index26.html

Thanks in advance for your time. As for usual, I will credit in my script anyone that can help me resolve this problem.