diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-11-08 17:22:29 +0000 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-11-08 17:22:29 +0000 |
commit | 28ac5fe9c1991c57d0a72d22377340b01ab6564b (patch) | |
tree | 7d395d9913739cb775a55f70dd69a3a04e578e51 /javascript/jsapi.h | |
parent | 9006a96119854e6975a66025bfaf9bf63767fec7 (diff) | |
download | netsurf-28ac5fe9c1991c57d0a72d22377340b01ab6564b.tar.gz netsurf-28ac5fe9c1991c57d0a72d22377340b01ab6564b.tar.bz2 |
implement appendChild so wikipedia lcm script works
Diffstat (limited to 'javascript/jsapi.h')
-rw-r--r-- | javascript/jsapi.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/javascript/jsapi.h b/javascript/jsapi.h index c8902ad8e..b7e91948e 100644 --- a/javascript/jsapi.h +++ b/javascript/jsapi.h @@ -62,6 +62,9 @@ /* arguments */ #define JSAPI_ARGV(cx, vp) (vp) +/* check if a jsval is an object */ +#define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v) + /* The object instance in a native call */ /* "this" JSObject getter */ JSObject * js_ComputeThis(JSContext *cx, JSObject *thisp, void *argv); @@ -150,6 +153,9 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx, /* arguments */ #define JSAPI_ARGV(cx, vp) (vp) +/* check if a jsval is an object */ +#define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v) + /* The object instance in a native call */ #define JSAPI_THIS_OBJECT(cx,vp) jsapi_this @@ -233,6 +239,14 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx, /* arguments */ #define JSAPI_ARGV(cx, vp) JS_ARGV(cx,vp) +/* check if a jsval is an object */ +#define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v) +/* The docuemntation says this is obsolete and should be + * ((JSVAL_IS_NULL(v)) || (JSVAL_IS_PRIMITIVE(v))) + * which doesnt work + */ + + /* The object instance in a native call */ #define JSAPI_THIS_OBJECT(cx,vp) JS_THIS_OBJECT(cx,vp) |