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

Robert O'Callahan robert at ocallahan.org
Wed May 1 01:49:17 PDT 2013


On Wed, May 1, 2013 at 8:01 PM, Elliott Sprehn <esprehn at chromium.org> wrote:

> fwiw WebKit (and Blink) implement this through CSS inheritance since you
> need to know the lang for all kinds of things and walking up the DOM
> repeatedly would be expensive.
>
> -webkit-locale is inherited by default and contains the enclosing @lang
> value. You can query it through getComputedStyle(node).webkitLocale. That
> doesn't help your custom parser though.
>

Interesting. What does "body:lang(en) { -webkit-locale:fr; }" do? :-)

Rob
-- 
q“qIqfq qyqoquq qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qyqoquq,q qwqhqaqtq
qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq qsqiqnqnqeqrqsq
qlqoqvqeq qtqhqoqsqeq qwqhqoq qlqoqvqeq qtqhqeqmq.q qAqnqdq qiqfq qyqoquq
qdqoq qgqoqoqdq qtqoq qtqhqoqsqeq qwqhqoq qaqrqeq qgqoqoqdq qtqoq qyqoquq,q
qwqhqaqtq qcqrqeqdqiqtq qiqsq qtqhqaqtq qtqoq qyqoquq?q qEqvqeqnq
qsqiqnqnqeqrqsq qdqoq qtqhqaqtq.q"



More information about the whatwg mailing list