Changes between Version 13 and Version 14 of jazz/09-01-04


Ignore:
Timestamp:
Jan 5, 2009, 1:10:27 AM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/09-01-04

    v13 v14  
    3333js> window.onload = function(){       ### 從這裡就可以開始寫自己的 JavaScript
    3434}}}
     35 * 另一個互動式 JavaScript Shell - SpiderMonkey
     36   * [安裝] Debian 已經有套件 - [http://packages.debian.org/etch/spidermonkey-bin spidermonkey-bin]
     37{{{
     38$ sudo apt-get install spidermonkey-bin
     39$ dpkg -L spidermonkey-bin
     40$ smjs
     41js> help()
     42JavaScript-C 1.8.0 pre-release 1 2007-10-03
     43Command                  Description
     44=======                  ===========
     45version([number])        Get or set JavaScript version number
     46options([option ...])    Get or toggle JavaScript options
     47load(['foo.js' ...])     Load files named by string arguments
     48readline()               Read a single line from stdin
     49print([exp ...])         Evaluate and print expressions
     50help([name ...])         Display usage and help messages
     51quit()                   Quit the shell
     52gc()                     Run the garbage collector
     53gcparam(name, value)
     54  Wrapper for JS_SetGCParameter. The name must be either 'maxBytes' or
     55  'maxMallocBytes' and the value must be convertable to a positive uint32
     56countHeap([start[, kind]])
     57  Count the number of live GC things in the heap or things reachable from
     58  start when it is given and is not null. kind is either 'all' (default) to
     59  count all things or one of 'object', 'double', 'string', 'function',
     60  'qname', 'namespace', 'xml' to count only things of that kind
     61trap([fun, [pc,]] exp)   Trap bytecode execution
     62untrap(fun[, pc])        Remove a trap
     63line2pc([fun,] line)     Map line number to PC
     64pc2line(fun[, pc])       Map PC to line number
     65stackQuota([number])     Query/set script stack quota
     66stringsAreUTF8()         Check if strings are UTF-8 encoded
     67testUTF8(mode)           Perform UTF-8 tests (modes are 1 to 4)
     68throwError()             Throw an error from JS_ReportError
     69build()                  Show build date and time
     70clear([obj])             Clear properties of object
     71intern(str)              Internalize str in the atom table
     72clone(fun[, scope])      Clone function object
     73seal(obj[, deep])        Seal object, or object graph if deep
     74getpda(obj)              Get the property descriptors for obj
     75getslx(obj)              Get script line extent
     76toint32(n)               Testing hook for JS_ValueToInt32
     77evalcx(s[, o])
     78  Evaluate s in optional sandbox object o
     79  if (s == '' && !o) return new o with eager standard classes
     80  if (s == 'lazy' && !o) return new o with lazy standard classes
     81sleep(dt)                Sleep for dt seconds
     82scatter(fns)             Call functions concurrently (ignoring errors)
     83js>
     84}}}
    3585
    3686== Lighttpd ==