4 ms·
While I don't entirely agree with your first statement, you could just grab the outerHTML instead of appending the element directly to the DOM: $.el.div($.el
by joestelmach 14y ago
While I don't entirely agree with your first statement, you could just grab the outerHTML instead of appending the element directly to the DOM:
$.el.div($.el.span()).outerHTML
- aneth 14y agoSeems like a reasonable solution. My first statement was certainly true in the previous generation of browsers, including IE 7. I'm not sure about more modern browsers. What basis do you have for disagreeing? Refer to: http://www.quirksmode.org/dom/innerhtml.html http://www.quirksmode.org/dom/innerhtml.html
- joestelmach 14y agoI'm only disagreeing with the use of the word 'performant', and the popular viewpoint that any solution that isn't as fast as possible can't be labeled as such.