Create the “Table of Contents” heading in javascript

This commit is contained in:
Philipp Oppermann
2016-07-17 16:42:21 +02:00
parent f4b84d55e2
commit 0f72384ed9
2 changed files with 8 additions and 3 deletions

View File

@@ -54,6 +54,11 @@
prefix: 'toc'
});
var heading = document.createElement("H2");
var heading_text = document.createTextNode("Table of Contents");
heading.appendChild(heading_text);
container.appendChild(heading);
container.appendChild(toc);
}
</script>