0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-13 22:11:20 -05:00
astro/packages/webapi/src/exclusions.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
1.2 KiB
TypeScript
Raw Normal View History

const exclusionsForHTMLElement = [ 'CustomElementsRegistry', 'HTMLElement', 'HTMLBodyElement', 'HTMLCanvasElement', 'HTMLDivElement', 'HTMLHeadElement', 'HTMLHtmlElement', 'HTMLImageElement', 'HTMLStyleElement', 'HTMLTemplateElement', 'HTMLUnknownElement', 'Image' ]
const exclusionsForElement = [ 'Element', ...exclusionsForHTMLElement ] as const
const exclusionsForDocument = [ 'CustomElementsRegistry', 'Document', 'HTMLDocument', 'document', 'customElements' ] as const
const exclusionsForNode = [ 'Node', 'DocumentFragment', 'ShadowRoot', ...exclusionsForDocument, ...exclusionsForElement ] as const
const exclusionsForEventTarget = [ 'AbortSignal', 'Event', 'CustomEvent', 'EventTarget', 'OffscreenCanvas', 'MediaQueryList', 'Window', ...exclusionsForNode ] as const
const exclusionsForEvent = [ 'AbortSignal', 'Event', 'CustomEvent', 'EventTarget', 'MediaQueryList', 'OffscreenCanvas', 'Window', ...exclusionsForNode ] as const
export const exclusions = {
'Blob+': [ 'Blob', 'File' ],
'Document+': exclusionsForDocument,
'Element+': exclusionsForElement,
'Event+': exclusionsForEvent,
'EventTarget+': exclusionsForEventTarget,
'HTMLElement+': exclusionsForHTMLElement,
'Node+': exclusionsForNode,
'StyleSheet+': [ 'StyleSheet', 'CSSStyleSheet' ],
}