- From: David Bruant <david.bruant@labri.fr>
- Date: Tue, 25 Oct 2011 11:34:50 +0200
- To: public-script-coord@w3.org
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