1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/public/nsIScriptLoaderObserver.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,47 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsIScriptElement; 1.12 +interface nsIURI; 1.13 + 1.14 +[scriptable, uuid(7b787204-76fb-4764-96f1-fb7a666db4f4)] 1.15 +interface nsIScriptLoaderObserver : nsISupports { 1.16 + 1.17 + /** 1.18 + * The script is available for evaluation. For inline scripts, this 1.19 + * method will be called synchronously. For externally loaded scripts, 1.20 + * this method will be called when the load completes. 1.21 + * 1.22 + * @param aResult A result code representing the result of loading 1.23 + * a script. If this is a failure code, script evaluation 1.24 + * will not occur. 1.25 + * @param aElement The element being processed. 1.26 + * @param aIsInline Is this an inline script or externally loaded? 1.27 + * @param aURI What is the URI of the script (the document URI if 1.28 + * it is inline). 1.29 + * @param aLineNo At what line does the script appear (generally 1 1.30 + * if it is a loaded script). 1.31 + */ 1.32 + void scriptAvailable(in nsresult aResult, 1.33 + in nsIScriptElement aElement, 1.34 + in boolean aIsInline, 1.35 + in nsIURI aURI, 1.36 + in int32_t aLineNo); 1.37 + 1.38 + /** 1.39 + * The script has been evaluated. 1.40 + * 1.41 + * @param aResult A result code representing the success or failure of 1.42 + * the script evaluation. 1.43 + * @param aElement The element being processed. 1.44 + * @param aIsInline Is this an inline script or externally loaded? 1.45 + */ 1.46 + void scriptEvaluated(in nsresult aResult, 1.47 + in nsIScriptElement aElement, 1.48 + in boolean aIsInline); 1.49 + 1.50 +};