Skip to content

Commit 9ce36f6

Browse files
authored
docs(templates): add std page lifecycle actions (#74)
Signed-off-by: Dwi Siswanto <[email protected]>
1 parent a1d0315 commit 9ce36f6

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

templates/protocols/headless.mdx

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,55 @@ args:
160160
value: /root/test/payload.txt
161161
```
162162

163+
### waitfcp
164+
165+
WaitFCP waits for the first piece of meaningful content, such as text or an image, indicating that the page is becoming useful.
166+
167+
```yaml
168+
action: waitfcp
169+
```
170+
171+
### waitfmp
172+
173+
WaitFMP waits for the First Meaningful Paint event, allowing users to proceed when content is visually ready.
174+
175+
```yaml
176+
action: waitfmp
177+
```
178+
179+
### waitdom
180+
181+
WaitDOM waits for the `DOMContentLoaded` event, indicating that the HTML has been loaded and parsed, but without waiting for stylesheets, images, and subframes to finish loading.
182+
183+
```yaml
184+
action: waitdom
185+
```
186+
163187
### waitload
164188

165-
WaitLoads waits for a page to finish loading and get in Idle state.
189+
WaitLoad waits the entire page, including dependent resources like stylesheets and images, has been fully loaded.
166190

167191
```yaml
168192
action: waitload
169193
```
170194

171-
Nuclei's `waitload` action waits for DOM to load, and window.onload event to be received after which we wait for the page to become idle for 1 seconds.
195+
### waitidle
196+
197+
WaitIdle waits until the page completely stopped making network requests and reaches a network idle state, indicating that all resources have been loaded.
198+
199+
```yaml
200+
action: waitidle
201+
```
202+
203+
### waitstable
204+
205+
WaitStable waits until the page is stable for *N* duration *(default is `1s`)*.
206+
207+
```yaml
208+
action: waitstable
209+
args:
210+
duration: 5s
211+
```
172212

173213
### waitdialog
174214

0 commit comments

Comments
 (0)