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

elem.innerText performance issue #11233

Open
patmmccann opened this issue Mar 18, 2024 · 0 comments
Open

elem.innerText performance issue #11233

patmmccann opened this issue Mar 18, 2024 · 0 comments

Comments

@patmmccann
Copy link
Collaborator

patmmccann commented Mar 18, 2024

Type of issue

Enhancement

Description

https://gist.github.com/paulirish/5d52fb081b3570c81e3a suggests element.innerText causes layout recalculations

Luckily only a few times is it used

email = targetElement.innerText;

const content = window.top.document.body.innerText.toLowerCase();

price: priceNode.textContent || priceNode.innerText

domain.push(domainNode.textContent || domainNode.innerText);

I wonder if we can somehow eliminate its use and ban calling it from the library via the linter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Blocked
Development

No branches or pull requests

2 participants