File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,18 @@ if (activeItem && mainMenu) {
1212 scrollToActiveItem ( activeItem ) ;
1313}
1414
15- if ( location . hash ) {
16- const header = document . querySelector ( `a[href='${ location . hash } ']` ) ;
17- header . scrollIntoView ( { behavior : 'instant' } ) ;
15+ function scrollToAndExpandSelectedMember ( ) {
16+ if ( location . hash ) {
17+ const header = document . querySelector ( `a[href='${ location . hash } ']` ) ;
18+ header . scrollIntoView ( { behavior : 'instant' } ) ;
19+ const details = document . querySelector ( `tr > td.fsdocs-member-usage:has(a[href='${ location . hash } ']) ~ td.fsdocs-member-xmldoc > details` ) ;
20+ details ?. setAttribute ( 'open' , 'true' ) ;
21+ }
1822}
1923
24+ scrollToAndExpandSelectedMember ( ) ;
25+ addEventListener ( 'hashchange' , _event => scrollToAndExpandSelectedMember ( ) ) ;
26+
2027if ( location . pathname . startsWith ( '/reference/' ) ) {
2128 // Scroll to API Reference header
2229 const navHeaders = document . querySelectorAll ( ".nav-header" ) ;
You can’t perform that action at this time.
0 commit comments