Skip to content

Proposal: new API to get text content across shadowRoot #1395

@woody-li

Description

@woody-li

What problem are you trying to solve?

Currently, we already have HTML-related API: getHTML, setHTML, etc.
But there's no way to get text content across shadowRoot.

In some cases, we need to get real text content across element shadowRoots.
Such as a customized tooltip, check content in the auto-test frame, etc.

What solutions exist today?

No response

How would you solve it?

How about adding a new API, like getText or getTextContent?
Add an option like checkVisibility to deal with hidden elements. (The difference between innerText and textContent)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    addition/proposalNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interesttopic: nodestopic: shadowRelates to shadow trees (as defined in DOM)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions