@shopify/app-bridge
Advanced tools
Comparing version 2.0.24 to 2.0.25
@@ -10,2 +10,5 @@ import { Group } from '../types'; | ||
REQUEST = "APP::FEATURES::REQUEST", | ||
/** | ||
* @deprecated as of 2.1.0. Use "APP::FEATURES::UPDATE" instead | ||
*/ | ||
REQUEST_UPDATE = "APP::FEATURES::REQUEST::UPDATE" | ||
@@ -31,2 +34,3 @@ } | ||
* @public | ||
* @deprecated as of 2.1.0. Use "APP::REQUEST::UPDATE" instead | ||
*/ | ||
@@ -33,0 +37,0 @@ export interface RequestUpdateOptions extends Options { |
@@ -12,3 +12,6 @@ "use strict"; | ||
Action["REQUEST"] = "APP::FEATURES::REQUEST"; | ||
/** | ||
* @deprecated as of 2.1.0. Use "APP::FEATURES::UPDATE" instead | ||
*/ | ||
Action["REQUEST_UPDATE"] = "APP::FEATURES::REQUEST::UPDATE"; | ||
})(Action = exports.Action || (exports.Action = {})); |
@@ -37,3 +37,3 @@ "use strict"; | ||
Action["SELECT"] = "APP::RESOURCE_PICKER::SELECT"; | ||
// Deprecated in 0.5.0 | ||
// Deprecated in 0.5.0 use 'APP::RESOURCE_PICKER::CANCEL' instead | ||
Action["CLOSE"] = "APP::RESOURCE_PICKER::CLOSE"; | ||
@@ -40,0 +40,0 @@ Action["UPDATE"] = "APP::RESOURCE_PICKER::UPDATE"; |
@@ -40,2 +40,8 @@ import type { AnyAction, ActionCallback, Unsubscribe } from './actions/types'; | ||
postMessage(message: any, origin: string): void; | ||
/** | ||
* Only needed when Web is loaded inside unframed mode on mobile | ||
*/ | ||
location?: { | ||
replace(url: string): void; | ||
}; | ||
} | ||
@@ -42,0 +48,0 @@ /** |
@@ -31,2 +31,18 @@ "use strict"; | ||
}, | ||
updateIframeUrl: function (newUrl) { | ||
var currentWindowLocation = window.location; | ||
var frameWindowLocation = (frame.window || {}).location; | ||
try { | ||
var newUrlOrigin = new URL(newUrl).origin; | ||
if (newUrlOrigin === localOrigin && frameWindowLocation) { | ||
frameWindowLocation.replace(newUrl); | ||
} | ||
else { | ||
currentWindowLocation.href = newUrl; | ||
} | ||
} | ||
catch (_) { | ||
// Noop | ||
} | ||
}, | ||
}); | ||
@@ -33,0 +49,0 @@ } |
{ | ||
"name": "@shopify/app-bridge", | ||
"version": "2.0.24", | ||
"version": "2.0.25", | ||
"types": "index.d.ts", | ||
@@ -56,3 +56,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "0c3aa24d39c86120c8823bd43f439cda0ab7df5e" | ||
"gitHead": "60fa946eeb60316459d58b45aba7cfc85dc0f7f7" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
889670
18549