Skip to content

Commit a6ada3b

Browse files
authored
Fetch documentation (php-debugbar#438)
1 parent 58998b8 commit a6ada3b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/ajax_and_stack.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ disruptive. You can disable this behavior by calling
5151
$renderer = $debugbar->getJavascriptRenderer();
5252
$renderer->setAjaxHandlerAutoShow(false);
5353

54+
## Fetch
55+
56+
Fetch API is supported by wrapping `window.fetch` so that the promise is also
57+
passed through to the debugbar AJAX handler.
58+
59+
If you find your fetch requests are not showing up in debugbar, you're probably
60+
initializing your JavaScript client library (e.g. Apollo) before debugbar has
61+
loaded, try adding `defer` onto your script tags, or moving them after the
62+
injected debugbar JavaScript.
63+
5464
## Stacked data
5565

5666
Some times you need to collect data about a request but the page won't actually

0 commit comments

Comments
 (0)