Commit 27a8f0b
committed
feat(pouch-link): Allow to inject event methods in CozyPouchLink
In previous commit we added a `platform` option into the PouchLink
constructor in order to allow injecting custom local storage API,
PouchDB adapter and isOnline method from a react-native project
We also want to inject a custom evant emitter for online/offline and
pause/resume events as react-native does not provide the
`document.addEventListener` and `document.removeEventListener` APIs
Like for the other APIs, if no injection is given, then `document` APIs
will be used by default1 parent fb54c99 commit 27a8f0b
2 files changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | | - | |
84 | | - | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | | - | |
93 | | - | |
| 93 | + | |
| 94 | + | |
94 | 95 | | |
95 | | - | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| 30 | + | |
21 | 31 | | |
22 | 32 | | |
23 | 33 | | |
0 commit comments