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

    Function spareClay

    • Builds a Clay only to take the components it registers for a page, without the listener its constructor adds.

      Clay keeps its own components to itself and registers one only for a row on the page it is built from, so a spare Clay is the way to reach one the real page lacks. Its constructor also adds a ready listener that reads the watch info and the account and watch tokens into the spare, which nothing reads. So the spare is built with Pebble.addEventListener swapped for a function that does nothing, and the real one goes back straight after, even when the build throws. A bridge that will not take the swap keeps its own and is left alone after, and the spare's listener then only fills in fields nobody reads.

      Type Parameters

      • Built

      Parameters

      Returns Built

      The spare Clay.