mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-07 17:41:54 +00:00
LibWeb: Allow progress element value to be set higher than the max value
Previously, we returned from the value setter if the specified value was above the max value. This is not required, as the getter clamps the returned value to the max value.
This commit is contained in:
parent
e795c24fdd
commit
ecbc686bc8
Notes:
sideshowbarker
2024-07-18 00:34:07 +09:00
Author: https://github.com/tcl3
Commit: ecbc686bc8
Pull-request: https://github.com/SerenityOS/serenity/pull/23624
3 changed files with 29 additions and 1 deletions
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const progressElement = document.createElement("progress");
|
||||
println(`value attribute initial value: ${progressElement.value}`);
|
||||
println(`max attribute initial value: ${progressElement.max}`);
|
||||
progressElement.value = -1;
|
||||
println(`value attribute after setting value attribute to -1: ${progressElement.value}`);
|
||||
progressElement.max = -1;
|
||||
println(`max attribute after setting max attribute to -1: ${progressElement.max}`);
|
||||
progressElement.value = 50;
|
||||
println(`value attribute after setting value attribute to 50: ${progressElement.value}`);
|
||||
progressElement.max = 100;
|
||||
println(`value attribute after setting max attribute to 100: ${progressElement.value}`);
|
||||
println(`max attribute after setting max attribute to 100: ${progressElement.max}`);
|
||||
progressElement.value = 101;
|
||||
println(`value attribute after setting max attribute to 101: ${progressElement.value}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue