Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Use prototype JavaScript library in Symbian Web Runtime

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
S60 3rd Edition FP2
Created: dougcn (19 Mar 2008)
Last edited: hamishwillee (07 Sep 2012)



As you may know, Prototype is a famous cross-web-browser javascript library. It supports almost all current popular web browsers, such as FireFox, Safari, IE, Opera, etc. With the latest version(Prototype 1.6.0), it also supports AppleWebKit, an open source web engine provided by Apple Inc. (It's also the web core engine of Safari web browser.)

The Nokia Web Browser is built upon S60WebKit, a port of the open source WebKit project to the S60 platform. Nokia WRT(Web-RunTime) is based on it.

Somebody would ask, "Can we use this library in the development of WRT applications?" The short answer is YES. For the long answer, I will take you through the following topics of this library:


To use prototype.js library, you need download it first and then include it in your widget applications.

Download prototype.js

First, download prototype.js from here. Second, create a folder named "javascript" or else in the root folder of your widget application. And then put prototype.js into that folder just created.

Include prototype.js in the main HTML file

The including syntax is as follows:

<script type="text/javascript" src="javascript/prototype.js"></script>

Place the above code snippet in between the head start tag( <head>) and head end tag(</head>) in the main HTML file.

Main topics

The main topics in this series are as follows:

Basic operations

This section shows how to do basice operations(utility functions,etc) with prototype.js in WRT widget application.

String manipulations

This section shows how to manipulate strings using prototype.js.

Object creation

This section shows how to define a class and a subclass, and other stuffs using prototype.js

Prototype UI

This section shows how to create a "Hello, world" window and even more using the prototype-based PWC (Prototype Window Class) or prototypeUI library in WRT widget application.

Form and AJAX(JSON)

This section shows how to make an ajax request and process the response using prototype.js in WRT widget application.

Other information

An example WRT application will be available for each topic. So, you can practice it yourself.

For the latest version of these demos, please go to here. You can check out the latest source code using a SVN client, or just download the pre-built installable wgz packages.


As shown in the above, prototype.js is a powerful javascript library which can be used in our WRT widget application. There are many many other features or many other prototype-based libraries which are not tested or mentioned in this series. For example, scriptaculous, a famous prototype-based javascript library, mainly focus on the UI effects. With these libraries, the development under WRT will be easier.


  • Prototype homepage [1]
  • Scriptaculous homepage [2]
  • PrototypeUI homepage [3]
This page was last modified on 7 September 2012, at 06:54.
72 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.