- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Wed, 1 May 2013 12:43:36 +0100
- To: Elliott Sprehn <esprehn@chromium.org>
- Cc: Peter Occil <poccil14@gmail.com>, WHATWG <whatwg@whatwg.org>
On Wed, May 1, 2013 at 9:01 AM, Elliott Sprehn <esprehn@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. What mechanism did you use for base URLs? Or is the cost there deemed acceptable? For direction you need to have a similar mechanism available. (And you'll have the same problem roc pointed out with :lang() if you solve that through CSS as :dir(ltr) and :dir(rtl) exist these days.) If browsers already implement some kind of API for these things it might be worth to expose them in the same way. -- http://annevankesteren.nl/
Received on Wednesday, 1 May 2013 11:44:01 UTC