File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ and the result will be <code>null</code>.</em>
565565 recursively.
566566
567567 <pre><code highlight=javascript>
568- document.addEventListener('navbeforefocus' , function(e) {
568+ document.addEventListener('navbeforefocus' , e => {
569569 e.preventDefault();
570570
571571 let target = e.relatedTarget;
@@ -574,10 +574,7 @@ and the result will be <code>null</code>.</em>
574574
575575 if (areas.length === 0) { break; }
576576
577- target = target.spatialNavigationSearch({
578- dir: e.dir,
579- candidates: areas
580- });
577+ target = target.spatialNavigationSearch(e.dir, { candidates: areas });
581578 }
582579 target.focus();
583580 });
@@ -597,7 +594,7 @@ and the result will be <code>null</code>.</em>
597594 or programmatic calls to {{focus()}} …
598595
599596 <pre><code highlight=javascript>
600- document.addEventListener('navnotarget' , function(e) {
597+ document.addEventListener('navnotarget' , e => {
601598 e.preventDefault();
602599
603600 const container = e.relatedTarget;
@@ -619,10 +616,7 @@ and the result will be <code>null</code>.</em>
619616 break;
620617 }
621618 } else {
622- const target = container.spatialNavigationSearch({
623- dir: e.dir,
624- candidates: areas
625- });
619+ const target = container.spatialNavigationSearch(e.dir, { candidates: areas });
626620 target.focus();
627621 }
628622 });
You can’t perform that action at this time.
0 commit comments