@contentstack/live-preview-utils
Version:
Contentstack provides the Live Preview SDK to establish a communication channel between the various Contentstack SDKs and your website, transmitting live changes to the preview pane.
26 lines (25 loc) • 449 B
JavaScript
import "../chunk-5WRI5ZAA.js";
// src/common/inIframe.ts
import { hasWindow } from "../utils/index.js";
function inIframe() {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
function isOpeningInNewTab() {
try {
if (hasWindow()) {
return !!window.opener;
}
return false;
} catch (e) {
return false;
}
}
export {
inIframe,
isOpeningInNewTab
};
//# sourceMappingURL=inIframe.js.map