mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
The WebDriver clear handler for textarea elements sets the raw value to child_text_content() instead of an empty string. This is a copy-paste from the adjacent reset handler, which correctly uses child_text_content() per its own spec. The clear spec says "set the raw value of element to an empty string".
17 lines
520 B
HTML
17 lines
520 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const textarea = document.createElement('textarea');
|
|
textarea.textContent = 'initial content';
|
|
document.body.appendChild(textarea);
|
|
|
|
textarea.value = 'user modified';
|
|
internals.clearElement(textarea);
|
|
println(`1. value after clear: "${textarea.value}"`);
|
|
println(`2. defaultValue after clear: "${textarea.defaultValue}"`);
|
|
|
|
document.body.removeChild(textarea);
|
|
});
|
|
</script>
|