Commit Graph

2 Commits

Author SHA1 Message Date
Tim van der Lippe
0c4b185233 script: Fix lookup of properties of DOMStringMap (#43046)
The conversion of strings was wrong for `--foo` where it should become
`-Foo`. Instead, it was consuming both the `--` and then would encounter
a `f`.

This moves the relevant algorithms to DOMStringMap and adds
corresponding spec comments to explain what's going on.

This does make us closer to passing
`html/dom/elements/global-attributes/dataset-delete.html` but
unfortunately it still fails because of #12978

Prior to this fix, the value of `d.dataset['-foo']` wasn't undefined.
However, we now fail the assertion where the attribute should remain,
despite the call to delete.

That's because per `LegacyOverrideBuiltIns` we should be checking the
existence of which properties it can delete, before it actually deletes
the attribute. Right now, we do it regardless if it is a valid property
and thus we incorrectly delete the attribute.

Testing: No change in tests, since the test in question has more
assertions that require more fixes

---------

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
2026-03-06 09:58:33 +00:00
Josh Matthews
af8d7c2de7 script: Move code generation and webidl files to new script_bindings crate. (#35157)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
2025-01-24 20:47:43 +00:00