Return to Snippet

Revision: 9302
at October 29, 2008 17:26 by matthewnovak


Initial Code
>>> from spidermonkey import Runtime
>>> 
>>> rt = Runtime()
>>> cx = rt.new_context()
>>> 
>>> print cx.eval_script('navigator.appCodeName;')
Mozilla
>>> print cx.eval_script('navigator.appName;')
Netscape
>>> print cx.eval_script('navigator.appVersion;')
5.0 (Macintosh; en-US)
>>> print cx.eval_script('navigator.cookieEnabled;')
0
>>> print cx.eval_script('navigator.language;')
en-US
>>> print cx.eval_script('navigator.mimeTypes;')
None
>>> print cx.eval_script('navigator.platform;')
MacIntel
>>> print cx.eval_script('navigator.plugins;')
None
>>> print cx.eval_script('navigator.systemLanguage;')
undefined
>>> print cx.eval_script('navigator.userAgent;')
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3
>>> print cx.eval_script('navigator.userLanguage;')
en-ca
>>> print cx.eval_script('navigator.javaEnabled();')
0

Initial URL
http://blackcodeseo.com/python-spidermonkey-navigator/

Initial Description

                                

Initial Title
Python-SpiderMonkey Implemeting Navigator

Initial Tags

                                

Initial Language
Python