bug-texinfo
[Top][All Lists]
Advanced

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

Re: INFO_CONFIG and info.js customization


From: Per Bothner
Subject: Re: INFO_CONFIG and info.js customization
Date: Sun, 8 Nov 2020 10:27:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 11/8/20 1:24 AM, Gavin Smith wrote:
On Sat, Nov 07, 2020 at 03:43:30PM -0800, Per Bothner wrote:

My suggestion is to flatten the config structure:

   var config = {
     EXT: ".html",
     INDEX_NAME: "index.html",
     INDEX_ID: "index",
     MAIN_ANCHORS: ["Top", "SEC_Contents"],
     WARNING_TIMEOUT: 3000,
     SCREEN_MIN_WIDTH: 700,

     // hooks:
     /** Define a function called after 'DOMContentLoaded' event in
         the INDEX_NAME context.
         @type {function (): void}*/
     on_main_load: null,
     /** Define a function called after 'DOMContentLoaded' event in
         the iframe context.
         @type {(function (): void)} */
     on_iframe_load: null
   };

Alternatively, we can replace the Object.assign call with something
that will also merge the hooks field.

Either option is fine with me; please go ahead and make the change
for whatever you make work.

See attachment.
--
        --Per Bothner
per@bothner.com   http://per.bothner.com/

Attachment: jsinfo.patch
Description: Text Data


reply via email to

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