(activeEl)
| 285 | } |
| 286 | |
| 287 | _bindEventOnRendered(activeEl) { |
| 288 | const { autoHeader } = this.config; |
| 289 | |
| 290 | scrollActiveSidebar(this.router); |
| 291 | |
| 292 | if (autoHeader && activeEl) { |
| 293 | const main = dom.getNode('#main'); |
| 294 | const firstNode = main.children[0]; |
| 295 | if (firstNode && firstNode.tagName !== 'H1') { |
| 296 | const h1 = this.compiler.header(activeEl.innerText, 1); |
| 297 | const wrapper = dom.create('div', h1); |
| 298 | dom.before(main, wrapper.children[0]); |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | _renderNav(text) { |
| 304 | text && this._renderTo('nav', this.compiler.compile(text)); |
no test coverage detected