(opts = {})
| 273 | return previousNode; |
| 274 | }, |
| 275 | focusFirst(opts = {}) { |
| 276 | let scope = scopeRef.current!; |
| 277 | let {tabbable, accept} = opts; |
| 278 | let scopeRoot = getScopeRoot(scope); |
| 279 | let walker = getFocusableTreeWalker(scopeRoot, {tabbable, accept}, scope); |
| 280 | walker.currentNode = scope[0].previousElementSibling!; |
| 281 | let nextNode = walker.nextNode() as FocusableElement; |
| 282 | if (nextNode) { |
| 283 | focusElement(nextNode, true); |
| 284 | } |
| 285 | return nextNode; |
| 286 | }, |
| 287 | focusLast(opts = {}) { |
| 288 | let scope = scopeRef.current!; |
| 289 | let {tabbable, accept} = opts; |
no test coverage detected