W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2011

Re: E4H

From: David Bruant <david.bruant@labri.fr>
Date: Tue, 25 Oct 2011 11:34:50 +0200
Message-ID: <4EA682BA.40105@labri.fr>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC