1
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3
* The contents of this file are subject to the Mozilla Public
4
* License Version 1.1 (the "License"); you may not use this file
5
* except in compliance with the License. You may obtain a copy of
6
* the License at http://www.mozilla.org/MPL/
8
* Software distributed under the License is distributed on an "AS
9
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
* implied. See the License for the specific language governing
11
* rights and limitations under the License.
13
* The Original Code is the Mozilla browser.
15
* The Initial Developer of the Original Code is Netscape
16
* Communications, Inc. Portions created by Netscape are
17
* Copyright (C) 1999, Mozilla. All Rights Reserved.
20
* Travis Bogard <travis@netscape.com>
23
#include "nsISupports.idl"
27
#include "nsIScriptContext.h"
31
* Implemented by any object capable of supplying a nsIScriptContext.
32
* The implentor may create the script context on demand and is
33
* allowed (though not expected) to throw it away on release.
36
interface nsIScriptContext;
37
interface nsIScriptGlobalObject;
39
[scriptable, uuid(A94EC640-0BBA-11D2-B326-00805F8A3859)]
40
interface nsIScriptContextOwner : nsISupports
43
* Returns a script context. The assumption is that the
44
* script context has an associated script global object and
45
* is ready for script evaluation.
47
nsIScriptContext getScriptContext();
50
* Returns the script global object
52
nsIScriptGlobalObject getScriptGlobalObject();
55
* Called to indicate that the script context is no longer needed.
56
* The caller should <B>not</B> also call the context's Release()
59
void releaseScriptContext(in nsIScriptContext aContext);
62
* Error notification method. Informs the owner that an error
63
* occurred while a script was being evaluted.
65
void reportScriptError(in string aErrorString, in string aFileName,
66
in long aLineNo, in string aLineBuf);