~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/dom/public/nsIScriptContextOwner.idl

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
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/
 
7
 * 
 
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.
 
12
 * 
 
13
 * The Original Code is the Mozilla browser.
 
14
 * 
 
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.
 
18
 * 
 
19
 * Contributor(s):
 
20
 *   Travis Bogard <travis@netscape.com>
 
21
 */
 
22
 
 
23
#include "nsISupports.idl"
 
24
 
 
25
%{ C++
 
26
#include "nscore.h"
 
27
#include "nsIScriptContext.h"
 
28
%}
 
29
 
 
30
/**
 
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.
 
34
 */
 
35
 
 
36
interface nsIScriptContext;
 
37
interface nsIScriptGlobalObject;
 
38
 
 
39
[scriptable, uuid(A94EC640-0BBA-11D2-B326-00805F8A3859)]
 
40
interface nsIScriptContextOwner : nsISupports
 
41
{
 
42
  /**
 
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.
 
46
   */
 
47
        nsIScriptContext getScriptContext();
 
48
 
 
49
  /**
 
50
   * Returns the script global object
 
51
   */
 
52
        nsIScriptGlobalObject getScriptGlobalObject();
 
53
 
 
54
  /**
 
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()
 
57
   * method.
 
58
   */
 
59
        void releaseScriptContext(in nsIScriptContext aContext);
 
60
 
 
61
  /**
 
62
   * Error notification method. Informs the owner that an error 
 
63
   * occurred while a script was being evaluted.
 
64
   */
 
65
        void reportScriptError(in string aErrorString, in string aFileName,
 
66
                         in long aLineNo, in string aLineBuf);
 
67
};