Detecting direction of text with JavaScript

Does anyone know how I would detect the direction of the content of the 
span element in the following?

<p dir=rtl>RTLTEXT <span>MORE RTLTEXT</span></p>

Cheers,
RI


-- 
Richard Ishida, W3C
http://rishida.net/

Received on Friday, 22 March 2013 11:52:29 UTC