MCPcopy Create free account
hub / github.com/dailydotdev/apps / isInExtensionIframe

Function isInExtensionIframe

packages/shared/src/lib/func.ts:91–100  ·  view source on GitHub ↗
(target: EventTarget | null)

Source from the content-addressed store, hash-verified

89// extension's own surface, global shortcuts should bail out so we don't
90// steal native browser bindings (Linear-style scoping).
91export const isInExtensionIframe = (target: EventTarget | null): boolean => {
92 if (!isExtension || typeof window === 'undefined') {
93 return false;
94 }
95 const node = target instanceof HTMLElement ? target : null;
96 if (!node) {
97 return false;
98 }
99 return node.tagName === 'IFRAME';
100};
101
102const appleDeviceMatch = /(Mac|iPhone|iPod|iPad)/i;
103

Callers 2

handleKeydownFunction · 0.90
onKeyDownFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected