| 1 |
= Prototype |
|---|
| 2 |
==== An object-oriented JavaScript framework |
|---|
| 3 |
|
|---|
| 4 |
Prototype is a JavaScript framework that aims to ease development of dynamic |
|---|
| 5 |
web applications. It offers a familiar class-style OO framework, extensive |
|---|
| 6 |
Ajax support, higher-order programming constructs, and easy DOM manipulation. |
|---|
| 7 |
|
|---|
| 8 |
=== Targeted platforms |
|---|
| 9 |
|
|---|
| 10 |
Prototype currently targets the following platforms: |
|---|
| 11 |
|
|---|
| 12 |
* Microsoft Internet Explorer for Windows, version 6.0 and higher |
|---|
| 13 |
* Mozilla Firefox 1.5 and higher |
|---|
| 14 |
* Apple Safari 2.0 and higher |
|---|
| 15 |
* Opera 9.25 and higher |
|---|
| 16 |
|
|---|
| 17 |
== Using Prototype |
|---|
| 18 |
|
|---|
| 19 |
To use Prototype in your application, download the latest release from the |
|---|
| 20 |
Prototype web site (http://prototypejs.org/download) and copy |
|---|
| 21 |
<tt>dist/prototype.js</tt> to a suitable location. Then include it in your HTML |
|---|
| 22 |
like so: |
|---|
| 23 |
|
|---|
| 24 |
<script type="text/javascript" src="/path/to/prototype.js"></script> |
|---|
| 25 |
|
|---|
| 26 |
=== Building Prototype from source |
|---|
| 27 |
|
|---|
| 28 |
<tt>prototype.js</tt> is a composite file generated from many source files in |
|---|
| 29 |
the <tt>src/</tt> directory. To build Prototype, you'll need: |
|---|
| 30 |
|
|---|
| 31 |
* a copy of the Prototype source tree, either from a distribution tarball or |
|---|
| 32 |
from the Subversion repository (see below) |
|---|
| 33 |
* Ruby 1.8.2 or higher (http://www.ruby-lang.org/) |
|---|
| 34 |
* Rake -- Ruby Make (http://rake.rubyforge.org/) |
|---|
| 35 |
* RDoc, if your Ruby distribution does not include it |
|---|
| 36 |
|
|---|
| 37 |
From the root Prototype directory, |
|---|
| 38 |
|
|---|
| 39 |
* <tt>rake dist</tt> will preprocess the Prototype source using ERB and |
|---|
| 40 |
generate the composite <tt>dist/prototype.js</tt>. |
|---|
| 41 |
* <tt>rake package</tt> will create a distribution tarball in the |
|---|
| 42 |
<tt>pkg/</tt> directory. |
|---|
| 43 |
|
|---|
| 44 |
== Contributing to Prototype |
|---|
| 45 |
|
|---|
| 46 |
Check out the Prototype source with |
|---|
| 47 |
$ svn co http://svn.rubyonrails.org/rails/spinoffs/prototype/trunk/ prototype |
|---|
| 48 |
|
|---|
| 49 |
Find out how to contribute: |
|---|
| 50 |
http://prototypejs.org/contribute |
|---|
| 51 |
|
|---|
| 52 |
== Documentation |
|---|
| 53 |
|
|---|
| 54 |
Please see the online Prototype API: |
|---|
| 55 |
http://prototypejs.org/api |
|---|
| 56 |
|
|---|