.appendChild(document.createTextNode(struct.text));
        a.title = struct.text;
        a.href = &quot;#&quot;+struct.id;

        var ele = document.createElement(&#39;li&#39;)
        ele.appendChild(a)
        ele.appendChild(navItemList(struct));
        return ele;
    }

    var navbarEle = document.getElementById(&quot;navbar&quot;)
    if (navbarEle === null) {  // create it
        navbarEle = document.createElement(&quot;div&quot;);
        navbarEle.id=&quot;navbar&quot;;
        navOuterEle =