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


Groups > comp.lang.javascript > #30646

Re: Then xmlns attribute in the XHTML DOM

Path csiph.com!news.mixmin.net!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: Then xmlns attribute in the XHTML DOM
Date Tue, 07 Jun 2016 20:29:53 +0200
Organization PointedEars Software (PES)
Lines 35
Message-ID <2430820.NM7pdxVHKh@PointedEars.de> (permalink)
References <xmlns-20160607025524@ram.dialup.fu-berlin.de>
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 1465324194 22044 eJwVyMkRgDAMBLCW4huXY9Zs/yVk0FNhKYnyjPRg0Gu74vg8hK2FUo9i6CCTeD8Z2a3/0rtxASQ4Eb4= (7 Jun 2016 18:29:54 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 7 Jun 2016 18:29:54 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYEBwCAIA7CXqtDizkGQ/09YQtNShYtyDgc9X3kpbYDAlaUiuBN7XutEHJAo+h4kFNWr0i7fWOd7P0dDFa8=
Cancel-Lock sha1:YgnnggEiYbvvL94E77w7Bk05+Dg=
X-NNTP-Posting-Host eJwFwYERADEIArCVioJe16kv+4/wibJQ0ywVZbl1MhB77kuvaCd6vE4W+yAIj+obvBBGPwtfEJM=
Xref csiph.com comp.lang.javascript:30646

Show key headers only | View raw


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 comp.lang.javascript | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web