Pebble App Framework: Phone API
    Preparing search index...

    Function combineCustomFns

    • Combines the settings page code into the custom function Clay takes.

      Every part's code is a function, which createClay checks for the face's customClay as the app starts. A part whose code is left out, as undefined or null, is skipped. With none left there is no custom function, and Clay keeps its own do-nothing one. With one, that code goes to Clay as it is, so the page carries exactly its source. With two or more, the page runs each once, in order, and logs a part that throws with console.error, by its label, while the next one still runs.

      The combined function only runs on the settings page, from the text Clay writes there. Called straight it throws, so there is one copy of how the parts run and no second one to drift from it.

      Parameters

      • parts: PagePart[]

        The page code, the framework's first and the face's customClay last.

      Returns unknown

      The custom function to hand Clay, or undefined when there is none.