This repository was archived by the owner on Feb 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 1+ <br >
12<div align =" center " height =" 500 " >
2- <img src =" logo.png " width =" 350 " height =" 220 " align =" center " >
3+ <img src =" logo.png " width =" 460 " height =" 220 " align =" center " >
34</div >
45
5- <br ><br >
6+ <br ><br >< br >
67### back-loader
78> a easy and steady preload lib, you can use it to load all kinds of resources. use ** back-loader** in your project,
89> can quickly preload more pictures, styles(.css) or scripts, it will make your website more fluent.
1718import { BackLoader } from ' back-loader'
1819
1920const backHandler = new BackLoader ({
20- urls: string [],
21- scripts: string [],
22- styles: string [],
23- images: string [],
21+ urls? : string [],
22+ scripts? : string [],
23+ styles? : string [],
24+ images? : string [],
2425})
2526
2627// at the right time:
2728backHandler .start ()
28- backHandler .onload = (event : any ) => {
29+ backHandler .onload = (event : loadEvent ) => {
2930 console .log (event )
3031}
32+
33+ type loadEvent = {
34+ source: string , // resource url, like: 'host.com/a.js'
35+ type: string , // resource type, like: 'script' / 'style' / 'image'
36+ success: boolean ,
37+ insertScripts? : Function ,
38+ }
3139` ` `
3240
3341#### LICENSE
You can’t perform that action at this time.
0 commit comments