UNPKG

meetup-web-mocks

Version:
37 lines (29 loc) 1.13 kB
'use strict'; exports.__esModule = true; exports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined; var _BrowserProtocol = require('./BrowserProtocol'); Object.defineProperty(exports, 'getUserConfirmation', { enumerable: true, get: function get() { return _BrowserProtocol.getUserConfirmation; } }); Object.defineProperty(exports, 'go', { enumerable: true, get: function get() { return _BrowserProtocol.go; } }); var _LocationUtils = require('./LocationUtils'); var _PathUtils = require('./PathUtils'); var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() { return (0, _LocationUtils.createLocation)(window.location); }; var pushLocation = exports.pushLocation = function pushLocation(location) { window.location.href = (0, _PathUtils.createPath)(location); return false; // Don't update location }; var replaceLocation = exports.replaceLocation = function replaceLocation(location) { window.location.replace((0, _PathUtils.createPath)(location)); return false; // Don't update location };