Add new inline_css, inline_js, and inline_head keys on the
AssetProvider::getAssets() function. This allows us to support
collectors that require static assets that are not actually saved to a
file.
Then, update all the asset functions in JavascriptRenderer to support
these new keys.
An initial use case for this is supporting the HtmlDumper in Symfony’s
VarDumper. HtmlDumper only provides the styles and scripts in inline
HTML form. The static assets can be customized based on some
configuration properties available on the HtmlDumper class. One can
actually view the CSS/JS as a long PHP string/heredoc embedded in the
HtmlDumper.php source code. They are only accessible via the
getDumpHeader function, which returns the CSS/JS in a combined HTML
string.
By default, the debug bar will immediately show new AJAX requests. If
your page makes a lot of requests in the background (e.g. tracking),
this constant switching of the active data set can be disruptive to the
debug bar user.
This commit adds an option for disabling this behavior by calling
setAjaxHandlerAutoShow(false) on the JavascriptRenderer, like this:
$renderer = $debugbar->getJavascriptRenderer();
$renderer->setAjaxHandlerAutoShow(false);
When this behavior is disabled, AJAX requests are still available in the
drop-down list, but won’t become active until the user explicitly
selects them.