W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > February 2011

Re: Golly gosh!

From: Michael[tm] Smith <mike@w3.org>
Date: Thu, 3 Feb 2011 02:29:24 +0900
To: Niklas Lindstr«Óm <lindstream@gmail.com>, Toby Inkster <tai@g5n.co.uk>
Cc: Ivan Herman <ivan@w3.org>, public-rdfa-wg@w3.org
Message-ID: <20110202172916.GA85099@sideshowbarker>
Niklas Lindstr«Óm <lindstream@gmail.com>, 2011-02-02 10:31 +0100:

> it doesn't work in Firefox; but it does if you change innerText
> (non-standard) to textContent. So:
> 
>   var spans = document.getElementsByTagName('span');
>   spans[0].textContent = spans[0].getAttribute("title");
> 
> works. (I used 'document' instead of 'document.body' too, although both work.)

Right. As far as I can tell the only problem here is the original test case
is broken in that it's not actually testing what it's intended to test.

To verify that everything does in fact get into the DOM as expected, maybe
a better way to check is to either use DOM-tree view in Firebug or to test
it using Live DOM Viewer:

  http://software.hixie.ch/utilities/js/live-dom-viewer/

-- 
Michael[tm] Smith
http://people.w3.org/mike
Received on Wednesday, 2 February 2011 17:29:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:50 UTC