diff --git a/src/sbbs3/js_internal.c b/src/sbbs3/js_internal.c index fff90a36a46ad7079c9653a218bbc1c362e9ba96..e13b8a5a9f9555813c3af44114568f114c2b774c 100644 --- a/src/sbbs3/js_internal.c +++ b/src/sbbs3/js_internal.c @@ -41,6 +41,7 @@ enum { ,PROP_MAXBYTES #endif ,PROP_GLOBAL + ,PROP_OPTIONS }; static JSBool js_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp) @@ -107,6 +108,9 @@ static JSBool js_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp) case PROP_GLOBAL: *vp = OBJECT_TO_JSVAL(JS_GetGlobalObject(cx)); break; + case PROP_OPTIONS: + *vp = UINT_TO_JSVAL(JS_GetOptions(cx)); + break; } return(JS_TRUE); @@ -181,6 +185,7 @@ static jsSyncPropertySpec js_properties[] = { { "max_bytes", PROP_MAXBYTES, JSPROP_ENUMERATE, 311 }, #endif { "global", PROP_GLOBAL, PROP_FLAGS, 314 }, + { "options", PROP_OPTIONS, PROP_FLAGS, 31802 }, {0} }; @@ -201,6 +206,7 @@ static char* prop_desc[] = { ,"maximum number of bytes available for heap" #endif ,"global (top level) object - <small>READ ONLY</small>" + ,"option flags - <small>READ ONLY</small>" /* New properties go here... */ ,"full path and filename of JS file executed" ,"directory of executed JS file"