File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -624,6 +624,32 @@ and the result will be <code>null</code>.</em>
624624</div>
625625</div>
626626
627+ <div class=example id=searchInside>
628+ This example shows how the different result of {{Element/spatialNavigationSearch()}}
629+ depending on the value of {{SpatialNavigationSearchOptions/inside}} attribute.
630+
631+ When the page has the code snippet as below,
632+
633+ <pre><code highlight=markup>
634+ <body>
635+ <div id="container" style="width:300px; height:200px; overflow-x: scroll;">
636+ <button id="button1"></button>
637+ </div>
638+ <button id="button2"></button>
639+ </body>
640+ </code></pre>
641+
642+ <pre><code highlight=javascript>
643+ const container = document.getElementById('container' );
644+
645+ const insideBtn = container.spatialNavigationSearch('right' , {inside: true});
646+ const outsideBtn = container.spatialNavigationSearch('right' );
647+ </code></pre>
648+
649+ <code> insideBtn</code> is assigned to the element whose {{Element/id}} matches with <code> 'button1' </code> .
650+ But <code> outsideBtn</code> is the element with {{Element/id}} <code> 'button2' </code> .
651+ </div>
652+
627653<div class=api>
628654<h2 id="events-navigationevent">
629655Navigation Events</h2>
You can’t perform that action at this time.
0 commit comments