We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
insertAdjacentHTML
1 parent 923491a commit 902b8fcCopy full SHA for 902b8fc
src/tests/dom/element.html
@@ -289,3 +289,17 @@
289
linkElement.rel = "stylesheet";
290
testing.expectEqual("stylesheet", linkElement.rel);
291
</script>
292
+
293
+<script id=insertAdjacentHTML>
294
+ const el4 = document.createElement("div");
295
296
+ const el5 = document.createElement("span");
297
+ el4.appendChild(el5);
298
299
+ const el6 = document.createElement("p");
300
+ el6.innerText = "content";
301
+ el4.appendChild(el6);
302
303
+ el5.insertAdjacentHTML("beforebegin", "<h1>title</h1>");
304
+ testing.expectEqual("<h1>title</h1><span></span><p>content</p>", el4.innerHTML);
305
+</script>
0 commit comments