From 28ac5fe9c1991c57d0a72d22377340b01ab6564b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 8 Nov 2012 17:22:29 +0000 Subject: implement appendChild so wikipedia lcm script works --- javascript/jsapi.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'javascript/jsapi.h') 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) -- cgit v1.2.3