MCPcopy
hub / github.com/docsifyjs/docsify / initFetch

Method initFetch

src/core/fetch/index.js:260–277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258 }
259
260 initFetch() {
261 const { loadSidebar } = this.config;
262
263 // Server-Side Rendering
264 if (this.rendered) {
265 const activeEl = getAndActive(this.router, '.sidebar-nav', true, true);
266 if (loadSidebar && activeEl) {
267 activeEl.parentNode.innerHTML += window.__SUB_SIDEBAR__;
268 }
269
270 this._bindEventOnRendered(activeEl);
271 this.$resetEvents();
272 this.callHook('doneEach');
273 this.callHook('ready');
274 } else {
275 this.$fetch(_ => this.callHook('ready'));
276 }
277 }
278 };
279}

Callers 1

constructorMethod · 0.80

Calls 5

$fetchMethod · 0.95
getAndActiveFunction · 0.90
_bindEventOnRenderedMethod · 0.80
$resetEventsMethod · 0.80
callHookMethod · 0.80

Tested by

no test coverage detected