Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30646 > unrolled thread
| Started by | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| First post | 2016-06-07 20:29 +0200 |
| Last post | 2016-06-07 20:29 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.javascript
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Then xmlns attribute in the XHTML DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-07 20:29 +0200
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-06-07 20:29 +0200 |
| Subject | Re: Then xmlns attribute in the XHTML DOM |
| Message-ID | <2430820.NM7pdxVHKh@PointedEars.de> |
Stefan Ram wrote: > span = document.createElement( 'span' ); > span.setAttribute( "xmlns", "http://www.w3.org/1999/xhtml" ); > document.getElementById( "example" ).appendChild( span ); > > , or > > span = document.createElementNS( "http://www.w3.org/1999/xhtml", "span" ); > document.getElementById( "example" ).appendChild( span ) > > , or even just > > span = document.createElement( 'span' ); > document.getElementById( "example" ).appendChild( span ) > > . Which of these three approaches is correct? The latter two. > Especially, I'd like to know whether the last one, the one > that does no mention »w3.org«, already is correct.) It is: <https://www.w3.org/TR/2015/REC-dom-20151119/#dom-document-createelement> Next time, RTFSpec. (It is not the first time that you should have done that before you posted.) -- 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 top | Article view | comp.lang.javascript
csiph-web