MAIDR JavaScript API
    Preparing search index...

    Function joinSelectorList

    • The one selector a flat list of selectors stood for, before 4.0.

      Until 4.0 a model that reads one selector string handed whatever it was given to querySelectorAll, and the DOM turns an array into a string by joining its entries with commas: ["#bars rect"] became "#bars rect", and ["#a rect", "#b rect"] became the selector list "#a rect,#b rect". Every producer that emitted its selector inside a list -- r-maidr and py-maidr among them, for years -- relied on that without knowing it. 4.0 stopped handing non-strings to the DOM (#750), so the same list matched nothing and the layer lost its highlight with no error, while speech and navigation kept working. py-maidr loads the latest maidr.js by default, so every installed copy lost it at once.

      This restores that meaning, and only that meaning: a non-empty list whose every entry is a non-blank string is joined into one selector list, which querySelectorAll answers in document order exactly as the coerced array did. Anything else -- an empty list, a blank entry, a nested grid, an object -- is not a legacy list and gets null, so the protection #750 added against [] and '' stands.

      Parameters

      • selectors: unknown

        The layer's selectors, as parsed from JSON

      Returns string | null

      The joined selector list, or null when selectors is not a flat list of strings