Implement user agent reporting

This commit is contained in:
Vincent Sanders 2015-10-09 12:54:00 +01:00
parent a897d87d18
commit f34a223b9a

View File

@ -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;
%}