 the navigation bar
 *  - and it&#39;s helper `extractStructure()` which extracts the structure of the page
 *    and adds ids to heading elements.
*/
function updateNavigation() {
    function navItemList(struct) {
        var listEle = document.createElement(&#39;ol&#39;)
        struct.children.forEach(childStruct=&gt;
            listEle.appendChild(navItem(childStruct))
        );
        return listEle;
    }
    function navItem(struct) {
        var a = document.createElement(&#39;a&#39;);
        a