On Wed, 05 Oct 2011 23:07:44 +0200, Jonas Sicking <[email protected]> wrote:
As has been pointed out, you can use
Element.matchesSelector(":lang('en-us')") or XPath to test if a node
has a given language. However neither lets you actually *get* the
language of a node, just check if it matches a particular language.
Additionally, matchesSelector doesn't work on text nodes.

We already have baseURI. I suppose we could have another such thing. "lang" is taken unfortunately. "language"? "naturalLang"? (Based on <img>.naturalHeight/Width.)

I do not think its exact behavior should be defined in DOM4, but we can certainly introduce the concept and say that other specifications define it. E.g. HTML and XML.


--
Anne van Kesteren
http://annevankesteren.nl/

Reply via email to