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


Groups > comp.lang.javascript > #30646 > unrolled thread

Re: Then xmlns attribute in the XHTML DOM

Started byThomas 'PointedEars' Lahn <PointedEars@web.de>
First post2016-06-07 20:29 +0200
Last post2016-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.


Contents

  Re: Then xmlns attribute in the XHTML DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-07 20:29 +0200

#30646 — Re: Then xmlns attribute in the XHTML DOM

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2016-06-07 20:29 +0200
SubjectRe: 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.

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web