1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.6.0) on Thu Mar 06 17:19:15 EST 2008 -->
10
<META NAME="date" CONTENT="2008-03-06">
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
14
<SCRIPT type="text/javascript">
15
function windowTitle()
17
if (location.href.indexOf('is-external=true') == -1) {
18
parent.document.title="Script (Rhino)";
27
<BODY BGCOLOR="white" onload="windowTitle();">
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="">
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> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
42
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
43
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
44
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
45
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
46
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
50
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
<A HREF="../../../org/mozilla/javascript/RhinoException.html" title="class in org.mozilla.javascript"><B>PREV CLASS</B></A>
58
<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>
61
<A HREF="Script.html" target="_top"><B>NO FRAMES</B></A>
62
<SCRIPT type="text/javascript">
65
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
70
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
77
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
83
<A NAME="skip-navbar_top"></A>
84
<!-- ========= END OF TOP NAVBAR ========= -->
87
<!-- ======== START OF CLASS DATA ======== -->
90
org.mozilla.javascript</FONT>
95
<DT><PRE>public interface <B>Script</B></DL>
99
All compiled scripts implement this interface.
101
This class encapsulates script execution relative to an
107
<DT><B>Since:</B></DT>
109
<DT><B>Author:</B></DT>
116
<!-- ========== METHOD SUMMARY =========== -->
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>
124
<TR BGCOLOR="white" CLASS="TableRowColor">
125
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
126
<CODE> 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> cx,
128
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</CODE>
131
Execute the script.</TD>
137
<!-- ============ METHOD DETAIL ========== -->
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>
147
<A NAME="exec(org.mozilla.javascript.Context, org.mozilla.javascript.Scriptable)"><!-- --></A><H3>
150
java.lang.Object <B>exec</B>(<A HREF="../../../org/mozilla/javascript/Context.html" title="class in org.mozilla.javascript">Context</A> cx,
151
<A HREF="../../../org/mozilla/javascript/Scriptable.html" title="interface in org.mozilla.javascript">Scriptable</A> scope)</PRE>
153
<DD>Execute the script.
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>.
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>
169
<!-- ========= END OF CLASS DATA ========= -->
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="">
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> </TD>
183
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
184
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
185
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
186
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
187
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
188
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
192
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
198
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
199
<A HREF="../../../org/mozilla/javascript/RhinoException.html" title="class in org.mozilla.javascript"><B>PREV CLASS</B></A>
200
<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>
203
<A HREF="Script.html" target="_top"><B>NO FRAMES</B></A>
204
<SCRIPT type="text/javascript">
207
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
212
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
219
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
220
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
221
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
222
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
225
<A NAME="skip-navbar_bottom"></A>
226
<!-- ======== END OF BOTTOM NAVBAR ======= -->