Hi I would like to do dom selection and manipulation out of the dom.
The goal is to build my widget out of the dom and to insert it in the dom only once it is ready.
My issue is that getElementById is not supported on a document fragment. I also tried createElement and cloneNode, but it does not work either.
I am trying to do that in plain js. I am used to do this with jQuery which handles it nicely. I tried to find the trick in jQuery source, but no success so far...
Olivier
I have done something similar, but not sure if it will meet your needs. Create a "holding area" such as a plain
<span id="spanReserve"></span>or<td id="cellReserve"></td>. Then you can do something like this in JS function:var holdingArea = document.getElementById('spanReserve'); holdingArea.innerHTML = widgetHTMLValue;