diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-08-17 11:52:59 +0100 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-08-17 12:25:49 +0100 |
commit | 22368db2325bf25d597023f34399b51c59cdfc2e (patch) | |
tree | ed6ead7f8f60a54d13a14c1a6e117c660a20e1c0 /javascript/jsapi.h | |
parent | fc0f732dec6a89e4c169bee222ee50daf33c7acd (diff) | |
download | netsurf-22368db2325bf25d597023f34399b51c59cdfc2e.tar.gz netsurf-22368db2325bf25d597023f34399b51c59cdfc2e.tar.bz2 |
add js property (dom attribute) support to the document/element objects
Diffstat (limited to 'javascript/jsapi.h')
-rw-r--r-- | javascript/jsapi.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/javascript/jsapi.h b/javascript/jsapi.h index 2c10d02ce..c4c1ed099 100644 --- a/javascript/jsapi.h +++ b/javascript/jsapi.h @@ -69,6 +69,9 @@ #define JSAPI_PS(name, tinyid, flags) \ { #name , tinyid , flags , jsapi_property_##name##_get , jsapi_property_##name##_set } +#define JSAPI_PS_RO(name, tinyid, flags) \ + { #name , tinyid , flags | JSPROP_READONLY, jsapi_property_##name##_get , NULL } + #define JSAPI_PS_END { NULL, 0, 0, NULL, NULL } static inline JSObject * @@ -126,7 +129,15 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx, jsapi_property_##name##_set \ } -#define JSAPI_PS_END { NULL, 0,0,NULL,NULL } +#define JSAPI_PS_RO(name, tinyid, flags) { \ + #name , \ + tinyid , \ + flags | JSPROP_READONLY, \ + jsapi_property_##name##_get , \ + NULL \ + } + +#define JSAPI_PS_END { NULL, 0, 0, NULL, NULL } #define JSString_to_char(injsstring, outchar, outlen) \ |