mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Limit progress element attribute values to the correct ranges
The max attribute is now clamped to ensure it is limited to positive numbers and the value attribute is clamped to ensure it is non-negative.
This commit is contained in:
committed by
Andreas Kling
parent
ecbc686bc8
commit
3a7a84f39b
Notes:
sideshowbarker
2024-07-16 21:42:29 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/3a7a84f39b Pull-request: https://github.com/SerenityOS/serenity/pull/23624
@@ -16,5 +16,10 @@
|
||||
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}`);
|
||||
progressElement.value = -1;
|
||||
println(`value attribute after setting value attribute to -1: ${progressElement.value}`);
|
||||
progressElement.max = 0;
|
||||
println(`value attribute after setting max attribute to 0: ${progressElement.value}`);
|
||||
println(`max attribute after setting max attribute to 0: ${progressElement.max}`);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user