Skip to content

Commit 3de94a5

Browse files
committed
Update api.njk for #446
1 parent 08cd613 commit 3de94a5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

site/src/api.njk

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ A "reset" function is returned, which will empty the active `IntersectionObserve
3030
Whether to switch from the default prefetching mode to the prerendering mode for the links inside the viewport.
3131

3232
> **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.
3341

3442
#### options.prerenderAndPrefetch
3543

@@ -170,7 +178,7 @@ By default, calls to `prefetch()` are low priority.
170178

171179
> **Note:** This behaves identically to `listen()`'s `priority` option.
172180

173-
### quicklink.prerender(urls)
181+
### quicklink.prerender(urls, eagerness)
174182

175183
Returns: `Promise`
176184

@@ -185,6 +193,13 @@ One or many URLs to be prerendered.
185193

186194
> **Note:** Speculative Rules API supports same-site cross origin Prerendering with [opt-in header](https://bit.ly/ss-cross-origin-pre).
187195

196+
#### eagerness
197+
198+
- Type: `String`
199+
- Default: `immediate`
200+
201+
Determines the mode to be used for prerendering specified within the speculation rules.
202+
188203
## Polyfills
189204

190205
`quicklink`:

0 commit comments

Comments
 (0)