Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18337
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <2407693.BvehyK1eGy@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <usenet@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Mon, 04 Feb 2013 02:35:12 +0100 |
| User-Agent | KNode/4.8.5 |
| Content-Transfer-Encoding | 8Bit |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Subject | Re: <span> text replacement ?? |
| Newsgroups | comp.lang.javascript |
| References | <an5bvtFgkc7U1@mid.individual.net> <kejvc0$mvf$1@dont-email.me> <kekthc$3mh$1@dont-email.me> <uMWdnbjG5eZLqpPMnZ2dnUVZ_qMAAAAA@westnet.com.au> <kelp75$o4b$1@dont-email.me> <KL6dnaQ_QdVwXZPMnZ2dnUVZ_omdnZ2d@westnet.com.au> <5418755.GafWFG2uKG@PointedEars.de> <ken1m8$pkn$1@speranza.aioe.org> |
| MIME-Version | 1.0 |
| Lines | 46 |
| NNTP-Posting-Date | 04 Feb 2013 02:35:12 CET |
| NNTP-Posting-Host | d1a4b930.newsspool4.arcor-online.net |
| X-Trace | DXC=0>QSS<LVAI3RLigj];iP=84IUK<Cl32<14Fo<]lROoR18kF<OcfhCO;@nETP0LS5I1DZm8W4\YJN<b@mF9jNikd5e8nA28^e?>2ARSiJjl]Vc7 |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | csiph.com comp.lang.javascript:18337 |
Show key headers only | View raw
Christoph Becker wrote:
> Thomas 'PointedEars' Lahn wrote:
>> Compare the result of
>>
>> el.textContent = "<strong>foo & bar</strong>";
>>
>> with that of
>>
>> el.innerHTML = "<strong>foo & bar</strong>";
>
> Or even
>
> el.textContent = "<g>";
>
> vs.
>
> el.innerHTML = "<g>";
Indeed, blindly assigning to the “innerHTML” property is particularly
problematic where the parser implementation is not stable, allows for
proprietary extensions, or fragments from other markup languages can be
embedded.
“g” is the name of an SVG element type [1], and a plain “<g>” tag will be
parsed into an HTMLUnknownElement node by an HTML5-compliant parser. The
same parser will parse it into an SVGGElement node when it is located within
“<svg>…</svg>”.
[It is not possible to accidentally insert HTML elements or to insert
SVG elements in an SVG document that way: the corresponding element
objects do not have an “innerHTML” property. Assigning to the
“innerHTML” property of an SVG element object will either fail with a
runtime error or create that String property on that host object,
having no other effect.]
Tested in Chromium “22.0.1229.94 Built on Debian wheezy/sid, running on
Debian 7.0 (161065)”.
[1] <http://www.w3.org/TR/SVG/struct.html#GElement>
--
PointedEars
Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
<span> text replacement ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-02-02 13:41 -0700
Re: <span> text replacement ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-02-02 23:10 +0200
Re: <span> text replacement ?? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-03 08:58 +1100
Re: <span> text replacement ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-03 00:51 +0100
Re: <span> text replacement ?? Jim T. <x@y.z> - 2013-02-03 12:03 -0500
Re: <span> text replacement ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-04 01:47 +0100
Re: <span> text replacement ?? Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-02-04 22:40 +0100
Re: <span> text replacement ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-03 02:03 +0100
Re: <span> text replacement ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-02-02 18:28 -0700
Re: <span> text replacement ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-02-03 07:49 +0200
Re: <span> text replacement ?? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-03 21:08 +1100
Re: <span> text replacement ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-02-03 07:45 +0200
Re: <span> text replacement ?? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-03 21:11 +1100
Re: <span> text replacement ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-02-03 15:38 +0200
Re: <span> text replacement ?? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-04 06:56 +1100
Re: <span> text replacement ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-03 22:35 +0100
Re: <span> text replacement ?? Christoph Becker <cmbecker69@gmx.de> - 2013-02-04 02:08 +0100
Re: <span> text replacement ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-02-04 02:35 +0100
Re: <span> text replacement ?? Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-02-04 22:54 +0100
Re: <span> text replacement ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-02-05 00:12 +0200
Re: <span> text replacement ?? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-06 11:42 +1100
Re: <span> text replacement ?? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-02-06 07:50 +0200
Re: <span> text replacement ?? Andrew Poulos <ap_prog@hotmail.com> - 2013-02-06 17:36 +1100
Re: <span> text replacement ?? Eric Bednarz <bednarz@fahr-zur-hoelle.org> - 2013-02-09 00:46 +0100
Re: <span> text replacement ?? Christoph Becker <cmbecker69@gmx.de> - 2013-02-04 02:21 +0100
csiph-web