diff options
| -rw-r--r-- | daemon/jskitmanager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/daemon/jskitmanager.cpp b/daemon/jskitmanager.cpp index c5a80e9..6b291df 100644 --- a/daemon/jskitmanager.cpp +++ b/daemon/jskitmanager.cpp @@ -145,14 +145,13 @@ void JSKitManager::startJsApp() globalObj.setProperty("console", _engine->newQObject(_jsconsole)); globalObj.setProperty("localStorage", _engine->newQObject(_jsstorage)); - QJSValue windowObj = _engine->newObject(); - windowObj.setProperty("localStorage", globalObj.property("localStorage")); - globalObj.setProperty("window", windowObj); - QJSValue navigatorObj = _engine->newObject(); navigatorObj.setProperty("geolocation", _engine->newQObject(_jsgeo)); globalObj.setProperty("navigator", navigatorObj); + // Set this.window = this + globalObj.setProperty("window", globalObj); + // Shims for compatibility... QJSValue result = _engine->evaluate( "function XMLHttpRequest() { return Pebble.createXMLHttpRequest(); }\n" |
