(opts = {})
| 256 | return previousNode; |
| 257 | }, |
| 258 | focusFirst(opts = {}) { |
| 259 | let scope = scopeRef.current!; |
| 260 | let {tabbable, accept} = opts; |
| 261 | let scopeRoot = getScopeRoot(scope); |
| 262 | let walker = getFocusableTreeWalker(scopeRoot, {tabbable, accept}, scope); |
| 263 | walker.currentNode = scope[0].previousElementSibling!; |
| 264 | let nextNode = walker.nextNode() as FocusableElement; |
| 265 | if (nextNode) { |
| 266 | focusElement(nextNode, true); |
| 267 | } |
| 268 | return nextNode; |
| 269 | }, |
| 270 | focusLast(opts = {}) { |
| 271 | let scope = scopeRef.current!; |
| 272 | let {tabbable, accept} = opts; |
nothing calls this directly
no test coverage detected