(instance: Instance, element: Element)
| 79 | } |
| 80 | |
| 81 | export function assertPointerEvents(instance: Instance, element: Element) { |
| 82 | const declaration = checkPointerEvents(instance, element) |
| 83 | |
| 84 | if (declaration?.pointerEvents === 'none') { |
| 85 | throw new Error( |
| 86 | [ |
| 87 | `Unable to perform pointer interaction as the element ${ |
| 88 | declaration.tree.length > 1 ? 'inherits' : 'has' |
| 89 | } \`pointer-events: none\`:`, |
| 90 | '', |
| 91 | printTree(declaration.tree), |
| 92 | ].join('\n'), |
| 93 | ) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | function printTree(tree: Element[]) { |
| 98 | return tree |