summaryrefslogtreecommitdiff
path: root/packages/webapi/src/lib/DOMException.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/lib/DOMException.ts
parent10a9c3412b4f6e8607687a74eafdb150d3222047 (diff)
downloadastro-f18ee36dc0abdc5c8ec87734de7962966d16fe65.tar.gz
astro-f18ee36dc0abdc5c8ec87734de7962966d16fe65.tar.zst
astro-f18ee36dc0abdc5c8ec87734de7962966d16fe65.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/lib/DOMException.ts')
-rw-r--r--packages/webapi/src/lib/DOMException.ts40
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/webapi/src/lib/DOMException.ts b/packages/webapi/src/lib/DOMException.ts
new file mode 100644
index 000000000..539871c6b
--- /dev/null
+++ b/packages/webapi/src/lib/DOMException.ts
@@ -0,0 +1,40 @@
+import * as _ from './utils'
+
+export class DOMException extends Error {
+ constructor(message = '', name = 'Error') {
+ super(message)
+
+ this.code = 0
+ this.name = name
+ }
+
+ code!: number
+
+ static INDEX_SIZE_ERR = 1
+ static DOMSTRING_SIZE_ERR = 2
+ static HIERARCHY_REQUEST_ERR = 3
+ static WRONG_DOCUMENT_ERR = 4
+ static INVALID_CHARACTER_ERR = 5
+ static NO_DATA_ALLOWED_ERR = 6
+ static NO_MODIFICATION_ALLOWED_ERR = 7
+ static NOT_FOUND_ERR = 8
+ static NOT_SUPPORTED_ERR = 9
+ static INUSE_ATTRIBUTE_ERR = 10
+ static INVALID_STATE_ERR = 11
+ static SYNTAX_ERR = 12
+ static INVALID_MODIFICATION_ERR = 13
+ static NAMESPACE_ERR = 14
+ static INVALID_ACCESS_ERR = 15
+ static VALIDATION_ERR = 16
+ static TYPE_MISMATCH_ERR = 17
+ static SECURITY_ERR = 18
+ static NETWORK_ERR = 19
+ static ABORT_ERR = 20
+ static URL_MISMATCH_ERR = 21
+ static QUOTA_EXCEEDED_ERR = 22
+ static TIMEOUT_ERR = 23
+ static INVALID_NODE_TYPE_ERR = 24
+ static DATA_CLONE_ERR = 25
+}
+
+_.allowStringTag(DOMException)