try {
if (typeof PerformanceObserver === 'function') {
const types = PerformanceObserver.supportedEntryTypes;
if (!Array.isArray(types) || types.length === 0) {
const desktop = Object.freeze(['element', 'event', 'first-input',
'interaction-contentful-paint', 'largest-contentful-paint', 'layout-shift',
'long-animation-frame', 'longtask', 'mark', 'measure', 'navigation', 'paint',
'resource', 'soft-navigation', 'visibility-state']);
_eoka_patchGetter(PerformanceObserver, 'supportedEntryTypes', () => () => desktop);
}
}
} catch(e) {}
try {
if (window.isSecureContext === false && window.location.protocol === 'https:' &&
window.top === window) {
_eoka_patchGetter(window, 'isSecureContext', () => () => true);
}
} catch(e) {}
try {
if ('sandbox' in window) {
delete window.sandbox;
}
} catch(e) {}
try {
if (!window.origin || window.origin === 'null') {
_eoka_patchGetter(window, 'origin', () => () => window.location.origin);
}
} catch(e) {}