2 var createNewElement = function (tag
, id
, text
) {
3 var result
= document
.createElement(tag
);
4 result
.setAttribute('id',id
);
5 result
.innerHTML
= text
;
9 var runTests = function () {
10 document
.getElementById("details").appendChild(createNewElement("b", "toadd", "should have bold test"));
14 <body onload=
"runTests()">
15 <details id=
"details" open
>
16 <summary>summary
</summary>