mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Co-authored-by: robertpin <robert.pin9@gmail.com> Co-authored-by: Gabriel Borlea <gabriel.borlea@8x8.com>
17 lines
339 B
TypeScript
17 lines
339 B
TypeScript
/**
|
|
* Checks whether we are loaded in iframe.
|
|
*
|
|
* @returns {boolean} Whether the current page is loaded in an iframe.
|
|
*/
|
|
export function inIframe(): boolean {
|
|
if (navigator.product === 'ReactNative') {
|
|
return false;
|
|
}
|
|
|
|
try {
|
|
return window.self !== window.top;
|
|
} catch (e) {
|
|
return true;
|
|
}
|
|
}
|