mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
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>
14 lines
501 B
Plaintext
14 lines
501 B
Plaintext
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
// https://html.spec.whatwg.org/multipage/#domstringmap
|
|
[Exposed=Window, LegacyOverrideBuiltIns]
|
|
interface DOMStringMap {
|
|
getter DOMString (DOMString name);
|
|
[CEReactions, Throws]
|
|
setter undefined (DOMString name, DOMString value);
|
|
[CEReactions]
|
|
deleter undefined (DOMString name);
|
|
};
|