Penguin

Differences between current version and predecessor to the previous major change of JavaScript.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 11 Last edited on Wednesday, August 24, 2005 9:37:27 am by AristotlePagaltzis
Older page: version 2 Last edited on Saturday, June 7, 2003 4:24:42 pm by PerryLorier Revert
@@ -1,10 +1,49 @@
-! JavaScript is a ScriptingLanguage designed by BrendanEich in 1995 for NetscapeNavigator version 2. It was originally called LiveScript in beta versions, but was renamed and slightly redesigned for the final release as [Netscape] had licensed [Java] from [Sun]
+JavaScript is a ProgrammingLanguage with DynamicTyping originally designed by Brendan Eich in 1995 for scripting NetscapeNavigator 2.. Called ~ LiveScript in beta versions, but was renamed and slightly redesigned for marketing reasons in the final release after [Netscape] licensed [Java] from SunMicrosystems. This has caused no end of confusion as the two languages have nearly nothing in common besides the first four letters of their names
  
+The language has grown over the years. The standard implementation is called ECMAScript, named after the standardization institute [ECMA] that it was handed to. Contrary to popular belief, these versions are pretty compatible. The problem many webdesigners were faced with is that the Document Object Model used to offer access to the [HTML] document a script belongs to in a browser has varied wildly.  
  
-!JavaScript has a syntax similar but it has DynamicTyping and semi-colons are optional. There are many different implementations of ! JavaScript. The [EMCA] standard is called [EMCAScript] , [Netscape]'s version is branded as !JavaScript, [Micrsoft]'s is called [JScript] and the [KDE] people have one called [KJS] (which is the base for the version in [Apple] 's [WebCore]) . With all these versions implementing a slightly different version of !JavaScript it can be hard to program for . With the proper [DOM ] implementations in [Mozilla] and InternetExplorer 6, it is much nicer to code in
+There are many pages on the web about JavaScript, but one of the best is the JavaScript section at [Peter-Paul Koch 's site | http://www .xs4all .nl/~ppk/js/ ]. 
  
-Like [JavaApplet]s, !JavaScript is designed[1] to be secure and thus has many security restrictions on what it can do. With [NetscapeNavigator] 4 and above and [Mozilla] you can use SignedJavascript to do such things as interacting with windows from other sites and reading this history.  
+----  
  
-There are many pages on the web about !JavaScript, but one of the best is Peter-Paul Koch's '' !JavaScript Section'' at [http://www.xs4all.nl/~ppk/js/].  
+!! Signing JavaScript 
  
-[1 ] well , at least intended to be ... 
+JavaScript has a relatively strict security model to prevent its use by malicious web content authors. (In practice, of course, the [Interpreter ]s in WebBrowser~s are plagued with holes.) Some of those restrictions can be lifted , with the user's permission, if JavaScript code is signed.  
+  
+To sign JavaScript code using [Mozilla], you use the <tt>signtool</tt>. First set your ''Master Password'' in Mozilla to something easy and insecure as you'll have to put it on the command line . A quick  
+  
+<pre>  
+signtool -d ~~/ .mozilla -l  
+</pre>  
+  
+will show you have no signing certificates . Quit [Mozilla] to generate one:  
+  
+<pre>  
+signtool -d ~~/.mozilla -p ''password'' -G ''certname''  
+</pre>  
+  
+Now recheck your certificate list and notice that you have a singing certificate:  
+  
+<pre>  
+signtool -d ~~/.mozilla -l  
+</pre>  
+  
+Make a new directory, put any script files or HTML files with JavaScript code in it (say, <tt>''foo''.html</tt>) and sign the directory contents with this command:  
+  
+<pre>  
+signtool -d ~~/.mozilla -p ''password'' -k ''certname'' -Z ''foo''.jar ''script_directory''  
+</pre>  
+  
+Test that it was signed correctly with:  
+  
+<pre>  
+signtool -d ~~/.mozilla -v ''foo''.jar  
+</pre>  
+  
+Referring to it as <tt>jar:~http://bar.com/baz/foo.jar!/foo.html</tt> will now allow unsafe code to execute provided the user has accepted your certificate.  
+  
+For a really thorough treatise on the subject, see [Signed Scripts in Mozilla | http://www.mozilla.org/projects/security/components/signed-scripts.html].  
+  
+----  
+  
+Part of CategoryProgrammingLanguages, CategoryObjectOrientedProgrammingLanguages, CategoryVeryHighLevelProgrammingLanguages