diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-10-05 15:46:22 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-10-05 15:46:22 +0100 |
commit | fbc3f36fb5a72c2cc399d5e83291ffabc299017e (patch) | |
tree | 3fc9807e1a07b5a46ede9fb6af7d1b5002619583 /javascript/duktape/Navigator.bnd | |
parent | 9ebdc7dd7abb7537f9e47a5dd8dab8585696da0b (diff) | |
download | netsurf-fbc3f36fb5a72c2cc399d5e83291ffabc299017e.tar.gz netsurf-fbc3f36fb5a72c2cc399d5e83291ffabc299017e.tar.bz2 |
initial js navigator binding
Diffstat (limited to 'javascript/duktape/Navigator.bnd')
-rw-r--r-- | javascript/duktape/Navigator.bnd | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/javascript/duktape/Navigator.bnd b/javascript/duktape/Navigator.bnd new file mode 100644 index 000000000..577ac29f0 --- /dev/null +++ b/javascript/duktape/Navigator.bnd @@ -0,0 +1,76 @@ +/* Navigator binding for browser using duktape and libdom + * + * Copyright 2015 Vincent Sanders <vince@netsurf-browser.org> + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * Released under the terms of the MIT License, + * http://www.opensource.org/licenses/mit-license + */ + +method Navigator::taintEnabled() +%{ + duk_push_boolean(ctx, false); + return 1; +%} + +getter Navigator::appCodeName() +%{ + duk_push_string(ctx, "Mozilla"); + return 1; +%} + +getter Navigator::appName() +%{ + duk_push_string(ctx, "Netscape"); + return 1; +%} + +getter Navigator::appVersion() +%{ + duk_push_string(ctx, "3.4"); + return 1; +%} + +getter Navigator::platform() +%{ + duk_push_string(ctx, NULL); + return 1; +%} + +getter Navigator::product() +%{ + duk_push_string(ctx, "Gecko"); + return 1; +%} + +getter Navigator::productSub() +%{ + duk_push_string(ctx, "20100101"); + return 1; +%} + +getter Navigator::vendor() +%{ + duk_push_string(ctx, NULL); + return 1; +%} + +getter Navigator::vendorSub() +%{ + duk_push_string(ctx, NULL); + return 1; +%} + +getter Navigator::cookieEnabled() +%{ + duk_push_boolean(ctx, false); + return 1; +%} + +/* indicate there is no plugin for java installed */ +getter Navigator::javaEnabled() +%{ + duk_push_boolean(ctx, false); + return 1; +%} |