()
| 28 | * @returns Answer to the given question. |
| 29 | */ |
| 30 | export function supportsDOMError(): boolean { |
| 31 | try { |
| 32 | // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': |
| 33 | // 1 argument required, but only 0 present. |
| 34 | // @ts-expect-error It really needs 1 argument, not 0. |
| 35 | new DOMError(''); |
| 36 | return true; |
| 37 | } catch { |
| 38 | return false; |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Tells whether current environment supports DOMException objects |