in scripts/docsite.ts [129:149]
function renderNavTree(): void {
let navRootUl: HTMLElement = document.getElementById('nav-root-ul');
if (!navRootUl) {
// The "nav-root-ul" element doesn't exist, so use Jekyll navigation instead
return;
}
console.log('Loading navigation');
fetch('/assets/nav_api.json')
.then(function(response) {
return response.json();
})
.then(function(jsonNodes: IJsonNode[]) {
const currentPageUrl: string = getUrlForComparison(document.location.pathname);
renderNavNodes(rootNodes, jsonNodes, navRootUl, undefined, currentPageUrl);
})
.catch(function(e) {
console.log('ERROR: Failed to fetch navigation: '+ e.toString());
});
}