Replace XHR events for generic ones in ScriptTask

fixup! Replace XHR events for generic ones in ScriptTask