0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-09-21 19:46:23 -04:00

[spidermonkey] element.outerHTML

This commit is contained in:
Witold Filipczyk
2024-05-08 18:32:59 +02:00
parent b3b6f66c51
commit 46a213ae49
2 changed files with 130 additions and 2 deletions

View File

@@ -18,8 +18,9 @@ function bb()
const container = document.getElementById("container");
const d = document.getElementById("d");
console.assert(container.firstElementChild.nodeName === 'DIV', 'DIV');
d.outerHTML = "<p>This paragraph replaced the original div.</p>";
d.outerHTML = '<p>' + d.outerHTML + '</p>';
console.assert(container.firstElementChild.nodeName === 'P', 'P');
console.assert(container.innerHTML === '\n <p></p><div id="d">This is a div.</div><p></p>\n', 'div p div');
}
console.error('element.outerHTML.html');