Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Element.computedLang #7994

Closed
nuxodin opened this issue Jun 8, 2022 · 1 comment
Closed

Proposal: Element.computedLang #7994

nuxodin opened this issue Jun 8, 2022 · 1 comment

Comments

@nuxodin
Copy link

nuxodin commented Jun 8, 2022

Hi,

If you want to output element-related text with JavaScript, you like to use the language that corresponds to the element. For example, in custom elements.

The current approach is to search for .closest([lang]).
But if it is not present, or incorrect, it becomes more difficult.

It would be desirable to have a property Element.computedLang that uses the same procedure as internally the CSS pseudo-class :lang().

What do you think?

@nuxodin nuxodin changed the title Proposal: Element.computedLang() Proposal: Element.computedLang Jun 8, 2022
@domenic
Copy link
Member

domenic commented Jun 8, 2022

Dupe of #7039.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants