Files

30 lines
918 B
TypeScript
Raw Permalink Normal View History

2026-03-29 12:24:30 +02:00
// Stub APIs not implemented by happy-dom but needed by dependencies
// XPathEvaluator is used by htmx at module evaluation time
// TODO: Remove after https://github.com/capricorn86/happy-dom/pull/2103 is released
if (!globalThis.XPathEvaluator) {
globalThis.XPathEvaluator = class {
createExpression() { return {evaluate: () => ({iterateNext: () => null})} }
} as any;
}
// Dynamic import so polyfills above are applied before htmx evaluates
await import('./globals.ts');
window.config = {
2024-08-28 18:32:38 +02:00
appUrl: 'http://localhost:3000/',
appSubUrl: '',
assetUrlPrefix: '/assets',
2026-03-29 12:24:30 +02:00
sharedWorkerUri: '',
2024-08-28 18:32:38 +02:00
runModeIsProd: true,
customEmojis: {},
pageData: {},
2026-03-23 08:49:25 +01:00
notificationSettings: {MinTimeout: 0, TimeoutStep: 0, MaxTimeout: 0, EventSourceUpdateTime: 0},
2024-08-28 18:32:38 +02:00
enableTimeTracking: true,
mermaidMaxSourceCharacters: 5000,
i18n: {},
};
2026-03-29 12:24:30 +02:00
window.testModules = {};
2026-03-29 12:24:30 +02:00
export {}; // mark as module for top-level await