mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 17:15:44 +00:00
LibWeb: Implement Element.outerHTML setter
This commit is contained in:
committed by
Andreas Kling
parent
faf33056da
commit
e070309258
20
Tests/LibWeb/Text/input/HTML/set-outerHTML.html
Normal file
20
Tests/LibWeb/Text/input/HTML/set-outerHTML.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<script src="../include.js"></script>
|
||||
<div id="oldBox"><p>A box.</p></div>
|
||||
<script>
|
||||
test(() => {
|
||||
let oldElement = document.getElementById("oldBox");
|
||||
println('');
|
||||
println(`${oldElement.id}='${oldElement.innerHTML}'`);
|
||||
|
||||
oldElement.outerHTML = '<div id="newBox"><p>Changed box.</p></div>';
|
||||
|
||||
let newElement = document.getElementById("newBox");
|
||||
println(`${newElement.id}='${newElement.innerHTML}'`);
|
||||
|
||||
try {
|
||||
document.documentElement.outerHTML = 'should throw exception!';
|
||||
} catch (e) {
|
||||
println(e);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user