bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: link handling in js-reader


From: Jacob Bachmeyer
Subject: Re: link handling in js-reader
Date: Thu, 04 Mar 2021 21:20:53 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

Per Bothner wrote:
On 3/4/21 12:16 PM, Gavin Smith wrote:
On Wed, Mar 03, 2021 at 08:25:59PM -0600, Jacob Bachmeyer wrote:

The texinfo tool that generates HTML has the ToC, so really the correct
solution here would be for the HTML output to include the 'target'
attributes directly. JS can then determine internal links by the absence of that attribute and the features at least somewhat gracefully degrade if JS
is disabled.

I don't know why you say that the manual does not degrade gracefully if
JS is disabled.

I guess the question is whether it makes sense for the generated html
to statically include target="_blank" attributes for external links - regardless of the presence or absence of JavaScript (as opposed to having the JavaScript info reader add the target="_blank" attribute). I don't feel strongly either
way, but it is worth considering.

We have the ToC available when generating HTML, but the js-reader scripts do not have access to the ToC, as was explained earlier. Encoding the important distinction "link target is in the ToC" into the static HTML provides that information to the js-reader scripts. Using the target="_blank" attribute serves a double purpose: it can indicate to js-reader that the link is an external link *and* it provides the "external links open in new windows/tabs" functionality even if JavaScript is disabled.


-- Jacob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]