UNPKG

@zohodesk/platform-middleware

Version:

Generalized Contract for the events from Marketplace App, In-App widgets, CRM-Plus and EFC

27 lines (22 loc) 680 B
export function loadSigmaAssests(cb) { require.ensure([], () => { window.ZApp = {}; require('./sigmafiles/ZFramework'); cb && cb(); }, 'ZFramework'); } export function loadInProductSDKAssets(configObj) { require.ensure([], () => { let globalNameSpace = configObj.globalNameSpace; window.globalNameSpace = globalNameSpace; if (typeof window[globalNameSpace] !== "undefined") { if (window[globalNameSpace].constructor !== {}.constructor) { window[globalNameSpace] = {}; } } else { window[globalNameSpace] = {}; } require('./platformfiles/ProductSDK'); configObj.cb && configObj.cb(); }, 'ProductSDK'); }