module SpiderCaml:Binding to SpiderMonkey's implementation of Javascript.sig
..end
new_global_obj
. All the values created
from this object (directly or not) are also attached
to this runtime.
It is not legal to mix values from several runtimes
(e.g. to set the value of a property of an object A
to a value B, where A and B are in different runtimes).
The exception InvalidRuntime
is raised when this rule is broken.
In order to avoid memory leaks, it is necessary to call
the destroy_runtime
on an arbitrary value of the runtime.
After this call, it is illegal to use values from this runtime
(actually, only calling closures and registering new ones
is prohibited). An exception RuntimeDestroyed
is raised
when this rule is broken.
type
jsval
type 'a
active = {
|
setter : |
|
getter : |
The setter
function is called when a property is written.
The first argument is the property name
and the second argument is the new value for the property.
The function can perform arbitrary side effects
and choose another value for the property.
Similarly, the getter
function is called when a property
is read. The second argument is the current value for the property
and the result is the actual value returned for the read operation.
class type jsobj =object
..end
val new_global_obj : ?active:jsobj active -> unit -> jsobj
val implementation_version : unit -> string
module Error:sig
..end