You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/api.njk
+16-1Lines changed: 16 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,14 @@ A "reset" function is returned, which will empty the active `IntersectionObserve
30
30
Whether to switch from the default prefetching mode to the prerendering mode for the links inside the viewport.
31
31
32
32
> **Note:** The prerendering mode (when this option is set to true) will fallback to the prefetching mode if the browser does not support prerender.
33
+
> Once the element exits the viewport, the `speculationrules` script is removed from the DOM. This approach makes it possible to exceed the limit of 10 prerenders imposed for the 'immediate' and 'eager' settings for eagerness.
34
+
35
+
#### options.eagerness
36
+
37
+
- Type: `String`
38
+
- Default: `immediate`
39
+
40
+
Determines the mode to be used for prerendering specified within the speculation rules.
33
41
34
42
#### options.prerenderAndPrefetch
35
43
@@ -170,7 +178,7 @@ By default, calls to `prefetch()` are low priority.
170
178
171
179
> **Note:** This behaves identically to `listen()`'s `priority` option.
172
180
173
-
### quicklink.prerender(urls)
181
+
### quicklink.prerender(urls, eagerness)
174
182
175
183
Returns: `Promise`
176
184
@@ -185,6 +193,13 @@ One or many URLs to be prerendered.
185
193
186
194
> **Note:** Speculative Rules API supports same-site cross origin Prerendering with [opt-in header](https://bit.ly/ss-cross-origin-pre).
187
195
196
+
#### eagerness
197
+
198
+
- Type: `String`
199
+
- Default: `immediate`
200
+
201
+
Determines the mode to be used for prerendering specified within the speculation rules.
0 commit comments