<script>
var createNewElement = function (tag, id, text) {
    var result = document.createElement(tag);
    result.setAttribute('id',id);
    result.innerHTML = text;
    return result;
};

var runTests = function () {
    var toremove = document.getElementById("toremove");
    toremove.parentNode.removeChild(toremove);
};
</script>

<body onload="runTests()">
    <details open>
        <summary>summary <span><b id="toremove">to be removed</b> shouldn't have any bold text.</span></summary>
    </details>
</body>
