I just ran into the same problem and I had to dig into the Apple Mail help files to find out what they use. They basically created their sidebar in HTML / CSS, and part of it is not part of the help viewer.
To enable the table of contents button in the help viewer, you need to use the javascript function:
window.HelpViewer.showTOCButton(bool, function, function);
For a more explicit example, the following code snippet will enable the "Table of Contents" button in Apple Help Viewer and associate it with the "toggleNavigation" function.
if ("HelpViewer" in window && "showTOCButton" in window.HelpViewer) { window.setTimeout(function () { window.HelpViewer.showTOCButton(true, toggleNavigation, toggleNavigation); window.HelpViewer.setTOCButton(true); }, 100); }
The toggleNavigation function will contain the code to open the sidebar.
function toggleNavigation() {
I found that using window.onload does not work, but setting a timeout of 100 ms. In Mail, Apple used the equivalent of the "toggleNavigation" function for both function parameters, as shown in the example. The third parameter is called when you click the "Table of Contents" button, but I have not determined what the second is for.
source share