mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-19 08:51:57 +00: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:
parent
58c523ae46
commit
50f642613d
Notes:
github-actions[bot]
2024-10-20 20:15:59 +00:00
Author: https://github.com/samu698 🔰
Commit: 50f642613d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1873
Reviewed-by: https://github.com/AtkinsSJ
4 changed files with 61 additions and 1 deletions
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>
|
Loading…
Add table
Add a link
Reference in a new issue