E-mail List Archives
Re: Always adding a dir attribute to <html>
From: Patrick H. Lauke
Date: Sep 8, 2023 5:04PM
- Next message: Léonie Watson: "TetraLogical is hiring"
- Previous message: H S: "Re: Always adding a dir attribute to "
- Next message in Thread: None
- Previous message in Thread: H S: "Re: Always adding a dir attribute to "
- View all messages in this Thread
On 08/09/2023 23:43, H S wrote:
> Then how come document.dir is not ltr if html element has no dir attribute?
Because document.dir "Returns the html element's dir attribute's value,
if any". If the dir attribute is missing, it is not automagically
backfilled/created. The actual computed directionality (e.g. what it is
actually evaluated as when the attribute is missing/empty/contains an
unrecognised value) can't be queried from JS, I believe.
P
--
Patrick H. Lauke
https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
https://mastodon.social/@patrick_h_lauke | skype: patrick_h_lauke
- Next message: Léonie Watson: "TetraLogical is hiring"
- Previous message: H S: "Re: Always adding a dir attribute to "
- Next message in Thread: None
- Previous message in Thread: H S: "Re: Always adding a dir attribute to "
- View all messages in this Thread