()
| 46 | * @returns Answer to the given question. |
| 47 | */ |
| 48 | export function supportsDOMException(): boolean { |
| 49 | try { |
| 50 | new DOMException(''); |
| 51 | return true; |
| 52 | } catch { |
| 53 | return false; |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Tells whether current environment supports History API |