()
| 60 | typeof globalThis.window?.__tcfapi === 'function'; |
| 61 | |
| 62 | export const startTcfSubscription = (): void => { |
| 63 | if (subscribed || typeof globalThis.window?.__tcfapi !== 'function') { |
| 64 | return; |
| 65 | } |
| 66 | |
| 67 | subscribed = true; |
| 68 | globalThis.window.__tcfapi('addEventListener', 2, onTcData); |
| 69 | }; |
| 70 | |
| 71 | export const subscribeTcf = (callback: () => void): (() => void) => { |
| 72 | listeners.add(callback); |
no outgoing calls
no test coverage detected