summaryrefslogtreecommitdiff
path: root/packages/webapi/src/exclusions.ts
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2022-03-07 15:36:22 -0600
committerGravatar GitHub <noreply@github.com> 2022-03-07 15:36:22 -0600
commitf18ee36dc0abdc5c8ec87734de7962966d16fe65 (patch)
treec01a7034186cb0bbe5e1d042f4a5dd09bad21ed5 /packages/webapi/src/exclusions.ts
parent10a9c3412b4f6e8607687a74eafdb150d3222047 (diff)
downloadastro-e48fac2743dfcbb8a76569580dbcb10d8776d1b5.tar.gz
astro-e48fac2743dfcbb8a76569580dbcb10d8776d1b5.tar.zst
astro-e48fac2743dfcbb8a76569580dbcb10d8776d1b5.zip
Add `@astrojs/webapi` package (#2729)@astrojs/webapi@0.11.0
* chore: add @astrojs/webapi * chore: update package.json * fix: update file case * fix: remove lowercase file * chore: update tests to use mocha * chore: update LICENSE
Diffstat (limited to 'packages/webapi/src/exclusions.ts')
-rw-r--r--packages/webapi/src/exclusions.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/webapi/src/exclusions.ts b/packages/webapi/src/exclusions.ts
new file mode 100644
index 000000000..d5a00f84f
--- /dev/null
+++ b/packages/webapi/src/exclusions.ts
@@ -0,0 +1,17 @@
+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' ],
+}