Display Something while app outside of Frame for Embedded Apps

Solved
achieveapplabs
Shopify Partner
494 39 76

Hi there,

 

How to display or at least detect your app is loading outside of Shopify when developing an embedded app?

 

Regards,

 

Sam

Use Approovly to create and track order approvals | Looking for more Shopify apps? achieveapplabs.com/#apps
0 Likes
ashukasma
Shopify Partner
39 11 10

I think you can check following code to detect 

 

if (window.top == window.self) {
//Not in App } else{ //In App }
Shopify Expert - https://experts.shopify.com/lucentinnovation
achieveapplabs
Shopify Partner
494 39 76

This is an accepted solution.

Thanks @ashukasma ,

 

That gives us the results we want. 

 

Regards,

 

Sam

Use Approovly to create and track order approvals | Looking for more Shopify apps? achieveapplabs.com/#apps
0 Likes