mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb/HTML: Implement inner text set according to spec
Replaced the ad-hoc implementation with a spec compliant one. This change fixes 36 WPT tests.
This commit is contained in:
committed by
Alexander Kalenik
parent
58c523ae46
commit
50f642613d
Notes:
github-actions[bot]
2024-10-20 20:15:59 +00:00
Author: https://github.com/samu698 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/50f642613de Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1873 Reviewed-by: https://github.com/AtkinsSJ
12
Tests/LibWeb/Text/input/HTML/set-innerText.html
Normal file
12
Tests/LibWeb/Text/input/HTML/set-innerText.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let element = document.createElement('div');
|
||||
element.innerText = "";
|
||||
println('Empty string: "' + element.innerHTML + '"');
|
||||
element.innerText = "foo";
|
||||
println('Simple text: "' + element.innerHTML + '"');
|
||||
element.innerText = "\rfoo\nbar\r\nbaz\n\rfoobar\n";
|
||||
println('Text with newlines: "' + element.innerHTML + '"');
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user