~ubuntu-branches/ubuntu/maverick/rhino/maverick

« back to all changes in this revision

Viewing changes to javadoc/org/mozilla/javascript/Script.html

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2008-03-22 13:49:49 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080322134949-2qmej1vbly8nm4vm
Tags: 1.7R1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<!--NewPage-->
 
3
<HTML>
 
4
<HEAD>
 
5
<!-- Generated by javadoc (build 1.6.0) on Thu Mar 06 17:19:15 EST 2008 -->
 
6
<TITLE>
 
7
Script (Rhino)
 
8
</TITLE>
 
9
 
 
10
<META NAME="date" CONTENT="2008-03-06">
 
11
 
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
 
13
 
 
14
<SCRIPT type="text/javascript">
 
15
function windowTitle()
 
16
{
 
17
    if (location.href.indexOf('is-external=true') == -1) {
 
18
        parent.document.title="Script (Rhino)";
 
19
    }
 
20
}
 
21
</SCRIPT>
 
22
<NOSCRIPT>
 
23
</NOSCRIPT>
 
24
 
 
25
</HEAD>
 
26
 
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
 
28
<HR>
 
29
 
 
30
 
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
 
32
<A NAME="navbar_top"><!-- --></A>
 
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 
35
<TR>
 
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 
37
<A NAME="navbar_top_firstrow"><!-- --></A>
 
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 
39
  <TR ALIGN="center" VALIGN="top">
 
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 
47
  </TR>
 
48
</TABLE>
 
49
</TD>
 
50
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 
51
</EM>
 
52
</TD>
 
53
</TR>
 
54
 
 
55
<TR>
 
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
57
&nbsp;<A HREF="../../../org/mozilla/javascript/RhinoException.html" title="class in org.mozilla.javascript"><B>PREV CLASS</B></A>&nbsp;
 
58
&nbsp;<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD>
 
59
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
60
  <A HREF="../../../index.html?org/mozilla/javascript/Script.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 
61
&nbsp;<A HREF="Script.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 
62
&nbsp;<SCRIPT type="text/javascript">
 
63
  <!--
 
64
  if(window==top) {
 
65
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
 
66
  }
 
67
  //-->
 
68
</SCRIPT>
 
69
<NOSCRIPT>
 
70
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
 
71
</NOSCRIPT>
 
72
 
 
73
 
 
74
</FONT></TD>
 
75
</TR>
 
76
<TR>
 
77
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
78
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
80
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 
81
</TR>
 
82
</TABLE>
 
83
<A NAME="skip-navbar_top"></A>
 
84
<!-- ========= END OF TOP NAVBAR ========= -->
 
85
 
 
86
<HR>
 
87
<!-- ======== START OF CLASS DATA ======== -->
 
88
<H2>
 
89
<FONT SIZE="-1">
 
90
org.mozilla.javascript</FONT>
 
91
<BR>
 
92
Interface Script</H2>
 
93
<HR>
 
94
<DL>
 
95
<DT><PRE>public interface <B>Script</B></DL>
 
96
</PRE>
 
97
 
 
98
<P>
 
99
All compiled scripts implement this interface.
 
100
 <p>
 
101
 This class encapsulates script execution relative to an
 
102
 object scope.
 
103
<P>
 
104
 
 
105
<P>
 
106
<DL>
 
107
<DT><B>Since:</B></DT>
 
108
  <DD>1.3</DD>
 
109
<DT><B>Author:</B></DT>
 
110
  <DD>Norris Boyd</DD>
 
111
</DL>
 
112
<HR>
 
113
 
 
114
<P>
 
115
 
 
116
<!-- ========== METHOD SUMMARY =========== -->
 
117
 
 
118
<A NAME="method_summary"><!-- --></A>
 
119
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
120
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
121
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
 
122
<B>Method Summary</B></FONT></TH>
 
123
</TR>
 
124
<TR BGCOLOR="white" CLASS="TableRowColor">
 
125
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
 
126
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
 
127
<TD><CODE><B><A HREF="../../../org/mozilla/javascript/Script.html#exec(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable)">exec</A></B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
 
128
     <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope)</CODE>
 
129
 
 
130
<BR>
 
131
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute the script.</TD>
 
132
</TR>
 
133
</TABLE>
 
134
&nbsp;
 
135
<P>
 
136
 
 
137
<!-- ============ METHOD DETAIL ========== -->
 
138
 
 
139
<A NAME="method_detail"><!-- --></A>
 
140
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
 
141
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
 
142
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
 
143
<B>Method Detail</B></FONT></TH>
 
144
</TR>
 
145
</TABLE>
 
146
 
 
147
<A NAME="exec(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
 
148
exec</H3>
 
149
<PRE>
 
150
java.lang.Object <B>exec</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A>&nbsp;cx,
 
151
                      <A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A>&nbsp;scope)</PRE>
 
152
<DL>
 
153
<DD>Execute the script.
 
154
 <p>
 
155
 The script is executed in a particular runtime Context, which
 
156
 must be associated with the current thread.
 
157
 The script is executed relative to a scope--definitions and
 
158
 uses of global top-level variables and functions will access
 
159
 properties of the scope object. For compliant ECMA
 
160
 programs, the scope must be an object that has been initialized
 
161
 as a global object using <code>Context.initStandardObjects</code>.
 
162
 <p>
 
163
<P>
 
164
<DD><DL>
 
165
<DT><B>Parameters:</B><DD><CODE>cx</CODE> - the Context associated with the current thread<DD><CODE>scope</CODE> - the scope to execute relative to
 
166
<DT><B>Returns:</B><DD>the result of executing the script<DT><B>See Also:</B><DD><A HREF="../../../org/mozilla/javascript/Context.html#initStandardObjects()"><CODE>Context.initStandardObjects()</CODE></A></DL>
 
167
</DD>
 
168
</DL>
 
169
<!-- ========= END OF CLASS DATA ========= -->
 
170
<HR>
 
171
 
 
172
 
 
173
<!-- ======= START OF BOTTOM NAVBAR ====== -->
 
174
<A NAME="navbar_bottom"><!-- --></A>
 
175
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
 
176
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 
177
<TR>
 
178
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 
179
<A NAME="navbar_bottom_firstrow"><!-- --></A>
 
180
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 
181
  <TR ALIGN="center" VALIGN="top">
 
182
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 
183
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 
184
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 
185
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 
186
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 
187
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 
188
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 
189
  </TR>
 
190
</TABLE>
 
191
</TD>
 
192
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 
193
</EM>
 
194
</TD>
 
195
</TR>
 
196
 
 
197
<TR>
 
198
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
199
&nbsp;<A HREF="../../../org/mozilla/javascript/RhinoException.html" title="class in org.mozilla.javascript"><B>PREV CLASS</B></A>&nbsp;
 
200
&nbsp;<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript"><B>NEXT CLASS</B></A></FONT></TD>
 
201
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 
202
  <A HREF="../../../index.html?org/mozilla/javascript/Script.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 
203
&nbsp;<A HREF="Script.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 
204
&nbsp;<SCRIPT type="text/javascript">
 
205
  <!--
 
206
  if(window==top) {
 
207
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
 
208
  }
 
209
  //-->
 
210
</SCRIPT>
 
211
<NOSCRIPT>
 
212
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
 
213
</NOSCRIPT>
 
214
 
 
215
 
 
216
</FONT></TD>
 
217
</TR>
 
218
<TR>
 
219
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
220
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 
221
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 
222
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 
223
</TR>
 
224
</TABLE>
 
225
<A NAME="skip-navbar_bottom"></A>
 
226
<!-- ======== END OF BOTTOM NAVBAR ======= -->
 
227
 
 
228
<HR>
 
229
 
 
230
</BODY>
 
231
</HTML>