Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #29066

Re: Difference between innerHTML and appendChild

Path csiph.com!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Difference between innerHTML and appendChild
Date Tue, 29 Dec 2015 22:18:27 +0100
Organization PointedEars Software (PES)
Lines 37
Message-ID <4358250.4VKeL7HZK3@PointedEars.de> (permalink)
References <af88d233-fb5e-485e-8247-261276d961d8@googlegroups.com> <n5s4ik$qej$1@dont-email.me> <n5s5e3$ttt$2@dont-email.me> <281220152045573344%timstreater@greenbee.net>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1451423908 17046 eJwFwQERADEIAzBLwErZ5Dwc9S/hkzx0ToFJpFLypjT2WvsFEPSY8JVM9dTb75CLG3ELNj8yyhFo (29 Dec 2015 21:18:28 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 29 Dec 2015 21:18:28 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwVxsERwDAIA7CZUrAh4xQw+4/Qq16C8bDDCToWe4QxjZJW2d53Mnmjq7Dq9Kjh7Lsv7DH/VxsqKWiU/AOITRdo
Cancel-Lock sha1:5VPO3gTGYltihlCRD4f92RKPvtM=
X-NNTP-Posting-Host eJwFwYEBwDAEBMCVIp7XcRD2H6F3pi7ehJvD1tbjAml6SBeL+ZjE6aoZYWOLd3H1adbrSP4FoxEE
Xref csiph.com comp.lang.javascript:29066

Show key headers only | View raw


Tim Streater wrote:

> […] Gregor Kofler […] wrote:
>> Am 2015-12-28 um 21:06 schrieb Aleksandro:
>>> On 28/12/15 13:54, bit-naughty@hotmail.com wrote:
>>>> From what I know, both innerHTML and appendChild put stuff INTO the
>>>> browser's current page - 

Not necessarily.  They do that only if the owner element already is part of 
the *rendered* document (which is something to be avoided since it causes 
reflow).

>>>> but if I appendChild(), is that *visible* straightaway? Or does it get
>>>> put into the DOM tree, but is not *shown* straightaway...? Can anyone
>>>> please explain?
>>> Yes.
>> Great. Let's hear it. The explanation.
> 
> […]
> When these are rendered and displayed is another question altogether.

But *that* was the OP’s question, the *first* question at any rate.

Neither of those questions was smart, though, since an “or” question is a 
bad idea to begin with, and instead of asking the OP could and should simply 
have tried (and refrained from asking if anyone could explain).  Therefore, 
this logically correct answer :)

<http://www.catb.org/~esr/faqs/smart-questions.html>

HTH

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Difference between innerHTML and appendChild bit-naughty@hotmail.com - 2015-12-28 08:54 -0800
  Difference between innerHTML and appendChild Ram Tobolski <ramtob@gmail.com> - 2015-12-28 10:54 -0800
  Re: Difference between innerHTML and appendChild Aleksandro <aleksandro@gmx.com> - 2015-12-28 17:06 -0300
    Re: Difference between innerHTML and appendChild Gregor Kofler <usenet@gregorkofler.com> - 2015-12-28 21:20 +0100
      Re: Difference between innerHTML and appendChild Tim Streater <timstreater@greenbee.net> - 2015-12-28 20:45 +0000
        Re: Difference between innerHTML and appendChild Gregor Kofler <usenet@gregorkofler.com> - 2015-12-28 23:46 +0100
        Re: Difference between innerHTML and appendChild Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-12-29 22:18 +0100

csiph-web