On Thu, Mar 04, 2021 at 09:20:53PM -0600, Jacob Bachmeyer wrote: > 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.
I don't see why all external links necessarily need to be opening in new windows.
