(target)
| 639 | }); |
| 640 | |
| 641 | function getFocusPath(target) { |
| 642 | let root = activeElements.root; |
| 643 | let current = target; |
| 644 | let path:string[] = []; |
| 645 | while(current !== root && current && current.parentElement) { |
| 646 | let parent = current.parentElement; |
| 647 | path.unshift(Array.prototype.indexOf.call(parent.children, current)); |
| 648 | current = parent; |
| 649 | } |
| 650 | return path; |
| 651 | } |
| 652 | |
| 653 | function handleBasicEventWithTarget(name) { |
| 654 | return (event) => { |