I'm trying to unset all javascript declarations in the document head.

By this I mean inline javascript that is added by 3rd party extensions using ->addScriptDeclaration(), and not javascript files that are added using ->addScript().

If I dump

    $doc = JFactory::getDocument();
    var_dump($doc->_scripts);

then all Javascript files added by the Joomla core and 3rd party extensions are shown.

If I dump

    $doc = JFactory::getDocument();
    var_dump($doc->_script['text/javascript']);

Then only the core javascript is shown, eg:

    string(79) "jQuery(window).on('load',  function() {
				new JCaption('img.caption');
			});"

Anything added by 3rd party extensions is not included and still gets outputted to the head.

Is it possible to intercept 3rd party script in the template or is it added at a later date and can only be done by a plugin at a certain event?