CodeSampleX

Sample

Enforce strict whitespace token separation for CSS attribute selector [attr~="val"] and prevent hyphenated substring matching in happy-dom

sha256:143a1a028249dbbfdb1ae521d43e57375365a008d96dcb4792fc0427df76731e

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Enforce strict whitespace token separation for CSS attribute selector [attr~="val"] and prevent hyphenated substring matching in happy-dom HOW
Packages
happy-dom 20.11.2
Environment
node
Created
2026-08-17T01:51:52Z

Commonly assumed

The CSS attribute selector [attr~="val"] treats hyphens as word boundaries and matches substrings in hyphenated attribute values.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts