File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ For use with [node](http://nodejs.org) and [npm](https://npmjs.com):
1818npm install --save quicklink
1919```
2020
21+ You can also grab ` quicklink ` from [ unpkg.com/quicklink] ( https://unpkg.com/quicklink ) .
22+
2123## Usage
2224
2325Once initialized, ` quicklink ` will automatically prefetch URLs for links that are in-viewport during idle time.
@@ -27,12 +29,22 @@ Quickstart:
2729``` html
2830<!-- Include quicklink from dist -->
2931<script src =" dist/quicklink.js" ></script >
30- <!-- Initialize (you can do this to whenever you want) -->
32+ <!-- Initialize (you can do this whenever you want) -->
3133<script >
3234quicklink ();
3335 </script >
3436```
3537
38+ For example, you can initialize after the ` load ` event fires:
39+
40+ ``` html
41+ <script >
42+ window .addEventListener (' load' , () => {
43+ quicklink ();
44+ });
45+ </script >
46+ ```
47+
3648ES Module import:
3749
3850``` js
You can’t perform that action at this time.
0 commit comments