Skip to content

textContent vs. innerText #923

@plievone

Description

@plievone

Fix #808 was merged but reverted in 23ab30f. So SVG text cannot be changed in Chrome, for example (issue #807).

Are there some internal tests relying on innerText behavior? It won't work on Firefox, so they should be fixed in any case?

innerText seems to return only visible text and little experimentation shows that it may invent formatting, such as \n between stacked divs and \n\n after headings, so it may affect markup under testing, for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions