(instance: Instance)
| 118 | } |
| 119 | |
| 120 | release(instance: Instance) { |
| 121 | const target = this.getTarget(instance) |
| 122 | const [leave] = getTreeDiff(target, null) |
| 123 | const init = this.getEventInit() |
| 124 | |
| 125 | // Currently there is no PointerEventsCheckLevel that would |
| 126 | // make this check not use the *asserted* cached value from `up`. |
| 127 | /* istanbul ignore else */ |
| 128 | if (hasPointerEvents(instance, target)) { |
| 129 | instance.dispatchUIEvent(target, 'pointerout', init) |
| 130 | leave.forEach(el => instance.dispatchUIEvent(el, 'pointerleave', init)) |
| 131 | } |
| 132 | |
| 133 | this.isCancelled = true |
| 134 | } |
| 135 | |
| 136 | private getTarget(instance: Instance) { |
| 137 | return this.position.target ?? instance.config.document.body |
no test coverage detected