On 10/22/2012 7:59 AM, David Bruant wrote:
Is adoptNode an important API? It's not a good design in my view, but
I'm in a glass house when it comes to criticizing DOM APIs :-P.
Perhaps it's ok for performance to be in a penalty box for adoptNode.
As a web developer, I've never used adoptNode, I don't even recall
having seen it in an actual website while view-sourcing. So if there is
a trade-off to be made in which the downside is adoptNode being slow, I
personnally think it's a worthwhile trade-off.
It's definitely used on some high-visibility websites; we had a bug
where some framework was calling .adoptNode on a plugin element and it
showed up on several sites including a German transit site and several
Chinese video sites. So I'd treat our assumptions with some caution.
I thought that using XHR to parse into a document and then adopting
those nodes into the current document is a fairly common occurrence, but
I might be wrong about that.
--BDS
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo