Re: E4H

Le 25/10/2011 11:18, David Bruant a écrit :
> (...)
>
> I think I read something a while ago about adding .innerHTML to
> documentFragment.
It was [1]. Later messages mention insertAdjacentHTML() as a good fit
for the use case.
It seems it would fit yours as well:
----
  var link = '<a href="http://example.org/">Example Organization</a>'
  document.body.insertAdjacentHTML("beforeend", link);
----

David

[1]
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-February/030657.html
[2]
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-February/030658.html

Received on Tuesday, 25 October 2011 09:35:25 UTC