From 274a76d97a878ef66155a215e1d16c33998f5597 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 1 Jul 2012 10:10:00 +0100 Subject: Add initial navigator object creation. Basic navigator object outline ready to add methods to. The navigator object contains all the information about the browser Signed-Off-By: Vincent Sanders --- javascript/jsapi/window.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'javascript/jsapi/window.c') diff --git a/javascript/jsapi/window.c b/javascript/jsapi/window.c index f1c845152..06e6cdfe8 100644 --- a/javascript/jsapi/window.c +++ b/javascript/jsapi/window.c @@ -202,8 +202,40 @@ static JSBool JSAPI_NATIVE(prompt, JSContext *cx, uintN argc, jsval *vp) return JS_TRUE; } +static JSBool JSAPI_NATIVE(close, JSContext *cx, uintN argc, jsval *vp) +{ + JSAPI_SET_RVAL(cx, vp, JSVAL_VOID); + + return JS_TRUE; +} + +static JSBool JSAPI_NATIVE(stop, JSContext *cx, uintN argc, jsval *vp) +{ + JSAPI_SET_RVAL(cx, vp, JSVAL_VOID); + + return JS_TRUE; +} + +static JSBool JSAPI_NATIVE(focus, JSContext *cx, uintN argc, jsval *vp) +{ + JSAPI_SET_RVAL(cx, vp, JSVAL_VOID); + + return JS_TRUE; +} + +static JSBool JSAPI_NATIVE(blur, JSContext *cx, uintN argc, jsval *vp) +{ + JSAPI_SET_RVAL(cx, vp, JSVAL_VOID); + + return JS_TRUE; +} + static JSFunctionSpec jsfunctions_window[] = { + JSAPI_FS(close, 0, 0), + JSAPI_FS(stop, 0, 0), + JSAPI_FS(focus, 0, 0), + JSAPI_FS(blur, 0, 0), JSAPI_FS(alert, 1, 0), JSAPI_FS(confirm, 1, 0), JSAPI_FS(prompt, 1, 0), -- cgit v1.2.3