iya-sts
    Preparing search index...

    Class export=

    Loads the catalogs a surface draws with, negotiates the page's language, and runs the language chooser.

    Index
    • Makes the loader.

      Parameters

      • env: any

        the browser's objects: fetch, document, navigator

      • page: PageLike

        the page, for its addresses

      • namespaces: string[]

        the catalog namespaces the surface draws (['home', 'chooser'])

      Returns export=

    • One attribute of the shell's <html>.

      Parameters

      • name: string

        the attribute

      Returns string

      its value, or ''

    • The browser's languages as an Accept-Language value.

      Returns string

      the tags, comma-separated, best first

    • Sends a choice to the chooser endpoint, as its form would have posted it, and keeps it for this page load.

      Parameters

      • lang: string

        the tag chosen

      • returnTo: string

        the return path the form carried

      Returns Promise<boolean>

      whether the endpoint took it

    • Draws the language chooser for a page drawn with t.

      Parameters

      • t: any

        the page's translator

      • returnTo: string

        the page's own path and query, the realm's prefix included

      Returns string

      the chooser's markup, or '' before the index is loaded

    • The catalog index, once.

      Returns Promise<any>

      the index, { source, catalogs, offered }

    • Fetches one JSON file, or null where it cannot be had.

      Parameters

      • path: string

        the path under the realm

      Returns Promise<any>

      the JSON, or null

    • Adds a namespace the page draws, for the next load() — a control a page draws only when the service says so (#561's account control), whose words are fetched only then.

      Parameters

      • namespace: string

        the namespace

      Returns boolean

      whether it was not loaded before

    • Loads the page's translator: negotiates, fetches the namespaces' catalogs along the chain, and marks the document's language and direction. It is also the default a helper handed no translator draws with.

      Parameters

      • Optionalinput: LoadInputs

        ui_locales and the person's own language, where known

      Returns Promise<any>

      the translator

    • Negotiates the page's language in today's order.

      Parameters

      • Optionalinput: LoadInputs

        ui_locales and the person's own language, where known

      Returns Promise<any>

      the negotiation

    • Answers a submit of the chooser drawn on the page: the choice is sent and then draws the page again. Any other form is left alone.

      Parameters

      • event: any

        the submit event

      • then: () => void

        what to do once the choice is taken

      Returns boolean

      whether the event was the chooser's

    • The query every catalog address carries: the build, so a new build's catalogs are new addresses and an old one's can be kept for good.

      Returns string

      ?v=<build>, or '' where the shell names none