Skip to content

Warn against the use of textContent #127

Closed
@BrannenGH

Description

@BrannenGH

Hi all,

We've run into some issues with playwright tests using textContent over innerText to validate text rendered in the browser.

Since innerText takes CSS styling into account and better reflects what is rendered on the page, I'd like a rule that could warn developers when using textContent, and instead push folks to use innerText, unless they have a specific reason not to.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions