mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-03 15:41:57 +00:00
These have a few rules that we didn't follow in most cases: - CSS-wide keywords are not allowed. (inherit, initial, etc) - `default` is not allowed. - The above and any other disallowed identifiers must be tested case-insensitively. This introduces a `parse_custom_ident_value()` method, which takes a list of disallowed identifier names, and handles the above rules.
14 lines
679 B
HTML
14 lines
679 B
HTML
<script src="../include.js"></script>
|
|
<div id="foo"></div>
|
|
<script>
|
|
test(() => {
|
|
const foo = document.getElementById("foo");
|
|
println(`Before testing: ${getComputedStyle(foo).getPropertyValue("animation-name")}`);
|
|
const cases = [ 'badger', 'none', 'BANANA', 'NONE', 'InHeRiT', 'revert', 'initial', 'unset', 'george', 'REVERT', 'NaCl', 'default', 'string', '32', 'done' ];
|
|
for (const name of cases) {
|
|
foo.style.setProperty('animation-name', 'INVALID');
|
|
foo.style.setProperty('animation-name', name);
|
|
println(`${name}: ${getComputedStyle(foo).getPropertyValue("animation-name")}`);
|
|
}
|
|
});
|
|
</script>
|