Environment
The Environment API provides utilities for information regarding the environment an App Home is running on.
Anchor to environmentEnvironment
The environment
API is available on the shopify
global. It contains information about the current environment an App Home is running on.
- Anchor to embeddedembeddedboolean
Whether the app is embedded in the Shopify admin.
- Anchor to mobilemobileboolean
Whether the app is running on Shopify Mobile.
- boolean
Whether the app is running on Shopify POS.
_EnvironmentApi
- embedded
Whether the app is embedded in the Shopify admin.
boolean
- mobile
Whether the app is running on Shopify Mobile.
boolean
- pos
Whether the app is running on Shopify POS.
boolean
interface _EnvironmentApi {
/**
* Whether the app is running on Shopify Mobile.
*/
mobile?: boolean;
/**
* Whether the app is embedded in the Shopify admin.
*/
embedded?: boolean;
/**
* Whether the app is running on Shopify POS.
*/
pos?: boolean;
}
Was this section helpful?
Environment
shopify.environment;
// => { mobile: false, embedded: true, pos: false }
examples
Environment
shopify.environment; // => { mobile: false, embedded: true, pos: false }