Skip to content

feat: add whitespaceFilter for slotted and children node observation#7641

Open
AKnassa wants to merge 1 commit into
microsoft:mainfrom
AKnassa:feat/7139-whitespace-filter
Open

feat: add whitespaceFilter for slotted and children node observation#7641
AKnassa wants to merge 1 commit into
microsoft:mainfrom
AKnassa:feat/7139-whitespace-filter

Conversation

@AKnassa

@AKnassa AKnassa commented Jul 12, 2026

Copy link
Copy Markdown

What this does

Adds a whitespaceFilter you can pass to slotted and children, so purely-whitespace text nodes are left out of the results.

Why

Formatting your HTML across multiple lines creates invisible whitespace text nodes. Those were showing up in slotted and children results, so code had to filter them out by hand every time.

What changed

  • New exported whitespaceFilter
  • Works with both slotted and children node observation
  • Opt-in — nothing changes unless you pass it

How to see it

Run the fast-element Playwright suite. 20 tests cover the children and slotted behaviour.

Closes #7139

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@AKnassa AKnassa marked this pull request as ready for review July 13, 2026 04:06
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add trim filter to slotted

1 participant