File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 3030 "pub" : " sh build/release.sh"
3131 },
3232 "dependencies" : {
33- "document-ready" : " ^2.0.1" ,
3433 "marked" : " ^0.3.6" ,
3534 "prismjs" : " ^1.6.0" ,
3635 "tinydate" : " ^1.0.0" ,
Original file line number Diff line number Diff line change 1- import ready from 'document-ready'
21import { initMixin } from './init'
32import { routerMixin } from './router'
43import { renderMixin } from './render'
54import { fetchMixin } from './fetch'
65import { eventMixin } from './event'
76import initGlobalAPI from './global-api'
87
8+ /**
9+ * Fork https://github.com/bendrucker/document-ready/blob/master/index.js
10+ */
11+ function ready ( callback ) {
12+ const state = document . readyState
13+
14+ if ( state === 'complete' || state === 'interactive' ) {
15+ return setTimeout ( callback , 0 )
16+ }
17+
18+ document . addEventListener ( 'DOMContentLoaded' , callback )
19+ }
20+
921function Docsify ( ) {
1022 this . _init ( )
1123}
You can’t perform that action at this time.
0 commit comments