Bug 1856777 [wpt PR 42330] - Update wpt metadata, a=testonly
[gecko.git] / dom / script / nsIScriptLoaderObserver.idl
blobceeb79cb395c786d6f3be2d7c8e4f4bcbcf73760
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIScriptElement;
9 interface nsIURI;
11 [scriptable, uuid(7b787204-76fb-4764-96f1-fb7a666db4f4)]
12 interface nsIScriptLoaderObserver : nsISupports {
14 /**
15 * The script is available for evaluation. For inline scripts, this
16 * method will be called synchronously. For externally loaded scripts,
17 * this method will be called when the load completes.
19 * @param aResult A result code representing the result of loading
20 * a script. If this is a failure code, script evaluation
21 * will not occur.
22 * @param aElement The element being processed.
23 * @param aIsInline Is this an inline classic script (as opposed to an
24 * externally loaded classic script or module script)?
25 * @param aURI What is the URI of the script (the document URI if
26 * it is inline).
27 * @param aLineNo At what line does the script appear (generally 1
28 * if it is a loaded script).
30 void scriptAvailable(in nsresult aResult,
31 in nsIScriptElement aElement,
32 in boolean aIsInlineClassicScript,
33 in nsIURI aURI,
34 in uint32_t aLineNo);
36 /**
37 * The script has been evaluated.
39 * @param aResult A result code representing the success or failure of
40 * the script evaluation.
41 * @param aElement The element being processed.
42 * @param aIsInline Is this an inline script or externally loaded?
44 [can_run_script]
45 void scriptEvaluated(in nsresult aResult,
46 in nsIScriptElement aElement,
47 in boolean aIsInline);