Mercurial > pymonkey
comparison docs/src/pymonkey.txt @ 58:7a3461ccaf1d
Added documentation for Context methods get_runtime(), new_object(), and init_standard_classes().
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 19 Jul 2009 19:58:15 -0700 |
parents | a2b617731398 |
children | c48b393f6461 |
comparison
equal
deleted
inserted
replaced
57:a2b617731398 | 58:7a3461ccaf1d |
---|---|
54 | 54 |
55 >>> cx = pymonkey.Runtime().new_context() | 55 >>> cx = pymonkey.Runtime().new_context() |
56 >>> isinstance(cx, pymonkey.Context) | 56 >>> isinstance(cx, pymonkey.Context) |
57 True | 57 True |
58 | 58 |
59 .. method:: get_runtime() | |
60 | |
61 Returns the :class:`Runtime` that the context belongs to. | |
62 | |
63 .. method:: new_object() | |
64 | |
65 Creates a new :class:`Object` instance and returns it. | |
66 | |
67 .. method:: init_standard_classes(object) | |
68 | |
69 Defines the standard JavaScript classes on the given | |
70 :class:`Object`, such as ``Array``, ``eval``, ``undefined``, and | |
71 so forth. For more information, see the documentation to | |
72 `JS_InitStandardClasses() | |
73 <https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JS_InitStandardClasses>`_, | |
74 which this method wraps. | |
75 | |
59 .. class:: Runtime() | 76 .. class:: Runtime() |
60 | 77 |
61 Creates a new JavaScript runtime. JS objects created by the runtime | 78 Creates a new JavaScript runtime. JS objects created by the runtime |
62 may only interact with other JS objects of the same runtime. | 79 may only interact with other JS objects of the same runtime. |
63 | 80 |