[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: js-info polishing
From: |
Per Bothner |
Subject: |
Re: js-info polishing |
Date: |
Fri, 30 Apr 2021 04:06:43 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 4/29/21 9:40 AM, Gavin Smith wrote:
Another problem: Navigate to
https://per.bothner.com/tmp/Kawa-txjs-plain/index.html
type "i" then "constant-fold", select the option in the menu, then press
Return.
Then the page
https://per.bothner.com/tmp/Kawa-txjs-plain/Application-and-Arguments-Lists.html#index-constant_002dfold
is correctly loaded, but the side bar menu is completely expanded, and scrolled
to the top.
The logic for updating the sidebar looks for matches to the URL in the ToC.
However, index links aren't in the ToC. We could fix this by using the Section
from the index to update the sidebar. Unfortunately, we have the same problem
for cross-reference to @anchor pseudo-nodes - which also aren't in the ToC.
I think we have to scan the loaded page "up" from the linked element until we
get to
a node-name that is in the ToC. This is made more complicated because the page
and the sidebar are usually in separate frames, so message-passing is needed.
As an aside, that we "fixed" the structure of the HTML may help here,
since it makes it easier to scan out from the anchor link for ancestor <div>
elements and collect their 'id' attributes as a list (that in turn we can use
when searching the ToC for a match).
--
--Per Bothner
per@bothner.com http://per.bothner.com/
- Re: js-info polishing, Per Bothner, 2021/04/27
- Re: js-info polishing, Gavin Smith, 2021/04/27
- Re: js-info polishing, Eli Zaretskii, 2021/04/27
- Re: js-info polishing, Per Bothner, 2021/04/27
- Re: js-info polishing, Per Bothner, 2021/04/29
- Re: js-info polishing, Eli Zaretskii, 2021/04/29
- Re: js-info polishing, Gavin Smith, 2021/04/29
- Re: js-info polishing, Per Bothner, 2021/04/29
- Re: js-info polishing, Eli Zaretskii, 2021/04/29
- Re: js-info polishing, Gavin Smith, 2021/04/29
- Re: js-info polishing,
Per Bothner <=
Re: js-info polishing, Per Bothner, 2021/04/27