W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2013

[whatwg] HTML: A DOM attribute that returns the language of a node

From: Peter Occil <poccil14@gmail.com>
Date: Tue, 23 Apr 2013 04:44:32 -0400
Message-ID: <E00AD5A1CAD34240843249005B528048@PeterPC>
To: <whatwg@whatwg.org>
I believe there should be a DOM attribute that returns the language of a node, as defined in section 3.2.3.3 "The lang and xml:lang attributes".

While there is a "lang" DOM attribute, it's inadequate because it's only affected by the element's "lang" content attribute.  Also, I don't see a way to get the "language of a node" otherwise, especially since it depends not only on "lang" and "xml:lang", but also on the HTTP Content-Language header, which may not be possible to retrieve with existing JavaScript methods, as far as I can tell.

--Peter
Received on Tuesday, 23 April 2013 08:45:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:57 UTC