File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
( function ( ) {
2
2
document . ready = function ( callback ) {
3
3
if ( document . addEventListener ) {
4
- document . addEventListener ( 'DOMContentLoaded' , function ( ) {
5
- document . removeEventListener ( 'DOMContentLoaded' , arguments . callee , false ) ;
4
+ const handler = function ( ) {
5
+ document . removeEventListener ( 'DOMContentLoaded' , handler , false ) ;
6
6
callback ( ) ;
7
- } , false )
8
- }
9
- else if ( document . attachEvent ) {
10
- document . attachEvent ( 'onreadystatechange' , function ( ) {
11
- if ( document . readyState == "complete" ) {
12
- document . detachEvent ( " onreadystatechange" , arguments . callee ) ;
7
+ } ;
8
+ document . addEventListener ( 'DOMContentLoaded' , handler , false ) ;
9
+ } else if ( document . attachEvent ) {
10
+ const handler = function ( ) {
11
+ if ( document . readyState === "complete" ) {
12
+ document . detachEvent ( ' onreadystatechange' , handler ) ;
13
13
callback ( ) ;
14
14
}
15
- } )
16
- }
17
- else if ( document . lastChild == document . body ) {
15
+ } ;
16
+ document . attachEvent ( 'onreadystatechange' , handler ) ;
17
+ } else if ( document . lastChild = == document . body ) {
18
18
callback ( ) ;
19
19
}
20
20
} ;
You can’t perform that action at this time.
0 commit comments