4 var createNewElement = function (tag
, id
, text
) {
5 var result
= document
.createElement(tag
);
6 result
.setAttribute('id',id
);
7 result
.innerHTML
= text
;
11 var runTests = function () {
12 document
.getElementById("dt1").appendChild(createNewElement("summary", "new1", "new 1"));
13 document
.getElementById("dt1").insertBefore(createNewElement("summary", "new2", "new 2"), document
.getElementById("new1"));
18 <body onload=
"runTests()">
19 <details open
id=
"dt1"></details>