From f34a223b9a1fb04f67c67edbe81f38b8adf9f73c Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 9 Oct 2015 12:54:00 +0100 Subject: Implement user agent reporting --- javascript/duktape/Navigator.bnd | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/javascript/duktape/Navigator.bnd b/javascript/duktape/Navigator.bnd index 577ac29f0..b18ca8e83 100644 --- a/javascript/duktape/Navigator.bnd +++ b/javascript/duktape/Navigator.bnd @@ -8,6 +8,11 @@ * http://www.opensource.org/licenses/mit-license */ +prologue Navigator() +%{ +#include "utils/useragent.h" +%} + method Navigator::taintEnabled() %{ duk_push_boolean(ctx, false); @@ -74,3 +79,9 @@ getter Navigator::javaEnabled() duk_push_boolean(ctx, false); return 1; %} + +getter Navigator::userAgent() +%{ + duk_push_string(ctx, user_agent_string()); + return 1; +%} -- cgit v1.2.3