michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIScriptElement; michael@0: interface nsIURI; michael@0: michael@0: [scriptable, uuid(7b787204-76fb-4764-96f1-fb7a666db4f4)] michael@0: interface nsIScriptLoaderObserver : nsISupports { michael@0: michael@0: /** michael@0: * The script is available for evaluation. For inline scripts, this michael@0: * method will be called synchronously. For externally loaded scripts, michael@0: * this method will be called when the load completes. michael@0: * michael@0: * @param aResult A result code representing the result of loading michael@0: * a script. If this is a failure code, script evaluation michael@0: * will not occur. michael@0: * @param aElement The element being processed. michael@0: * @param aIsInline Is this an inline script or externally loaded? michael@0: * @param aURI What is the URI of the script (the document URI if michael@0: * it is inline). michael@0: * @param aLineNo At what line does the script appear (generally 1 michael@0: * if it is a loaded script). michael@0: */ michael@0: void scriptAvailable(in nsresult aResult, michael@0: in nsIScriptElement aElement, michael@0: in boolean aIsInline, michael@0: in nsIURI aURI, michael@0: in int32_t aLineNo); michael@0: michael@0: /** michael@0: * The script has been evaluated. michael@0: * michael@0: * @param aResult A result code representing the success or failure of michael@0: * the script evaluation. michael@0: * @param aElement The element being processed. michael@0: * @param aIsInline Is this an inline script or externally loaded? michael@0: */ michael@0: void scriptEvaluated(in nsresult aResult, michael@0: in nsIScriptElement aElement, michael@0: in boolean aIsInline); michael@0: michael@0: };