aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/projects/rhino/examples/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/mozilla/projects/rhino/examples/index.html')
-rw-r--r--files/zh-cn/mozilla/projects/rhino/examples/index.html35
1 files changed, 0 insertions, 35 deletions
diff --git a/files/zh-cn/mozilla/projects/rhino/examples/index.html b/files/zh-cn/mozilla/projects/rhino/examples/index.html
deleted file mode 100644
index 087697b94a..0000000000
--- a/files/zh-cn/mozilla/projects/rhino/examples/index.html
+++ /dev/null
@@ -1,35 +0,0 @@
----
-title: Rhino Examples
-slug: Mozilla/Projects/Rhino/Examples
-translation_of: Mozilla/Projects/Rhino/Examples
----
-<div>
-  </div>
-<p></p>
-<p>Examples have been provided that show how to control the JavaScript engine and how  to implement scriptable host objects. All the examples are in the git tree at <code><a href="https://github.com/mozilla/rhino/tree/master/examples/">mozilla/js/rhino/examples</a></code>.</p>
-<h2 id="Sample_Scripts"><a id="sample" name="sample">Sample Scripts</a></h2>
-<p>The <code><a href="https://github.com/mozilla/rhino/tree/master/examples/unique.js">unique.js</a></code> script allows printing unique lines from a file.</p>
-<p>The <code><a href="https://github.com/mozilla/rhino/tree/master/examples/liveConnect.js">liveConnect.js</a></code> script shows a sample usage of LiveConnect (Java-to-JavaScript connectivity).</p>
-<p>The <code><a href="https://github.com/mozilla/rhino/tree/master/examples/jsdoc.js">jsdoc.js</a></code> script is a JavaScript analog to Java's <code>javadoc</code>. It makes heavy use of regular expressions.</p>
-<p>The <code><a href="https://github.com/mozilla/rhino/tree/master/examples/checkParam.js">checkParam.js</a></code> script is a useful tool to check that <code>@param</code> tags in Java documentation comments match the parameters in the corresponding Java method.</p>
-<p>The <code><a href="https://github.com/mozilla/rhino/tree/master/examples/enum.js">enum.js</a></code> script is a good example of using a JavaAdapter to implement a Java interface using a JavaScript object.</p>
-<p>The <a href="https://github.com/mozilla/rhino/tree/master/examples/NervousText.js">NervousText.js</a> script is a JavaScript implementation of the famous NervousText applet using JavaScript compiled to Java classes using <a href="jsc.html">jsc</a>. It can be run in the HTML page <a href="https://github.com/mozilla/rhino/tree/master/examples/NervousText.html">NervousText.html</a>.</p>
-<h2 id="Controlling_the_JavaScript_Engine"><a id="controlling" name="controlling">Controlling the JavaScript Engine</a></h2>
-<h4 id="The_RunScript_class">The RunScript class</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/RunScript.java">RunScript.java</a></code> is a simple program that executes a script from the command line.</p>
-<h4 id="The_Control_class">The Control class</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/Control.java">Control.java</a></code> is a program that executes a simple script and then manipulates the result.</p>
-<h4 id="JavaScript_Shell">JavaScript Shell</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/Shell.java">Shell.java</a></code> is a program that executes JavaScript programs; it is a simplified version of the shell in the <code>tools</code> package. The programs may be specified as files on the command line or by typing interactively while the shell is running.</p>
-<h4 id="PrimitiveWrapFactory">PrimitiveWrapFactory</h4>
-<p><a href="https://github.com/mozilla/rhino/tree/master/examples/PrimitiveWrapFactory.java">PrimitiveWrapFactory.java</a> is an example of a WrapFactory that can be used to control the wrapping behavior of the Rhino engine on calls to Java methods.</p>
-<h4 id="Multithreaded_Script_Execution">Multithreaded Script Execution</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/DynamicScopes.java">DynamicScopes.java</a></code> is a program that creates a single global scope object and then shares it across multiple threads. Sharing the global scope allows both information to be shared across threads, and amortizes the cost of Context.initStandardObjects by only performing that expensive operation once.</p>
-<h2 id="Implementing_Host_Objects">Implementing Host Objects</h2>
-<p>First check out the <a href="/en/docs/Rhino/Embedding_tutorial">tutorial</a> if you haven't already.</p>
-<h4 id="The_Foo_class_-_Extending_ScriptableObject">The Foo class - Extending ScriptableObject</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/Foo.java">Foo.java</a></code> is a simple JavaScript host object that includes a property with an associated action and a variable argument method.</p>
-<h4 id="The_Matrix_class_-_Implementing_Scriptable">The Matrix class - Implementing Scriptable</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/Matrix.java">Matrix.java</a></code> provides a simple multidimensional array by implementing the Scriptable interface.</p>
-<h4 id="The_File_class_-_An_advanced_example">The File class - An advanced example</h4>
-<p><code><a href="https://github.com/mozilla/rhino/tree/master/examples/File.java">File.java</a></code> extends ScriptableObject to provide a means of reading and writing files from JavaScript. A more involved example of host object definition.</p>