Skip to content

Commit 608d285

Browse files
authored
Merge branch 'master' into feature/vue-example
2 parents 8203fe2 + ece45dc commit 608d285

File tree

12 files changed

+104
-143
lines changed

12 files changed

+104
-143
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tests
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
66
lint:

docs/events.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ ias.once('appended', handler);
2020

2121
## Reference
2222

23+
### ready
24+
25+
This event is triggered when the DOM is ready. Right after this event Infinite Ajax Scroll will bind (unless the [`bind`](./options.md#bind) option is set to `false`).
26+
2327
### binded
2428

2529
This event is triggered when Infinite Ajax Scroll binds to the scroll and resize events of the scroll container. This mostly happens right after the DOM is ready, but this can be configured with the `bind` option.

docs/options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ See [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttp
9595
## bind
9696

9797
**Type:** `boolean`<br>
98-
**Default:** `false`<br>
98+
**Default:** `true`<br>
9999
**Required:** no
100100

101-
By default Infinite Ajax Scroll binds to the scroll and resize events on document ready. If you want manual control over this behaviour you can set this option to `false`. To bind call the [`bind`](methods.md#bind) method.
101+
By default Infinite Ajax Scroll binds to the scroll and resize events on document ready. If you want to have manual control over this behaviour you can set this option to `false`. To bind manually you can call the [`bind`](methods.md#bind) method.
102102

103103
## scrollContainer
104104

package-lock.json

Lines changed: 28 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"build": "rollup -c",
4040
"watch": "rollup -c --watch",
4141
"cypress": "cypress open -d",
42-
"start": "serve -l 8080 -n ./ &",
42+
"start": "serve -l 8080 -n ./",
4343
"test": "cypress run",
4444
"lint": "eslint src test"
4545
},
@@ -50,7 +50,7 @@
5050
"tiny-emitter": "^2.1.0"
5151
},
5252
"devDependencies": {
53-
"cypress": "^7.1.0",
53+
"cypress": "^8.0.0",
5454
"eslint": "^7.3.1",
5555
"eslint-plugin-cypress": "^2.2.1",
5656
"rollup": "^2.0.3",

src/events.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const LOADED = 'loaded';
88
export const ERROR = 'error';
99
export const LAST = 'last';
1010
export const NEXT = 'next';
11+
export const READY = 'ready';
1112
export const SCROLLED = 'scrolled';
1213
export const RESIZED = 'resized';
1314
export const PAGE = 'page';
@@ -25,6 +26,7 @@ const events = {
2526
ERROR,
2627
LAST,
2728
NEXT,
29+
READY,
2830
SCROLLED,
2931
RESIZED,
3032
PAGE,

0 commit comments

Comments
 (0)