summaryrefslogtreecommitdiff
path: root/cli/js/web/dom_exception.ts
blob: 5e7d5ee6f67cfee0c177cbfee8dc31fb4ffd09e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.

export class DOMExceptionImpl extends Error implements DOMException {
  readonly #name: string;

  constructor(message = "", name = "Error") {
    super(message);
    this.#name = name;
  }

  get name(): string {
    return this.#name;
  }
}