Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Commit

Permalink
RIPPLE-74 Ripple does not pass geolocation info to app.
Browse files Browse the repository at this point in the history
The underlying problem here was that Ripple was failing to patch window.navigator.
  • Loading branch information
Tim Barham committed May 6, 2015
1 parent ded244a commit fb3127b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions lib/client/emulatorBridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,18 @@ module.exports = {
_doc = doc;
_xhr = win.XMLHttpRequest;

var marshal = function (obj, key) {
window[key] = win[key] = obj;
},
currentPlatform = platform.current(),
sandbox = {};
function marshal(obj, key) {
// Use defineProperty, otherwise we won't be able to override built-in read-only properties.
Object.defineProperty(window, key, {
value: obj
});
Object.defineProperty(win, key, {
value: obj
});
}

var currentPlatform = platform.current(),
sandbox = {};

marshal(window.tinyHippos, "tinyHippos");
marshal(window.XMLHttpRequest, "XMLHttpRequest");
Expand Down

0 comments on commit fb3127b

Please sign in to comment.