Skip to content

Is there a way to nest overloaded signatures into an accordion in newer versions? #2869

Answered by Gerrit0
luc10921 asked this question in Q&A
Discussion options

You must be logged in to vote

Since it might be convenient, you can use the customJs option to specify a custom JS file without writing a custom theme. If you tell it to load this JS, it will bring back a rudimentary dropdown (I didn't bother with animations)

// CC0
(function() {
    for (const container of document.querySelectorAll(".tsd-signatures")) {
        // Don't bother attaching event listeners if there is only one signature
        if (container.children.length > 1) {
            initSignatures(container);
        }
    }

    /** @param {Element} container */
    function initSignatures(container) {
        const headings = Array.from(container.children, e => e.children[0]);
        const descriptions = Array.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by luc10921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants