campfire.js
    Preparing search index...

    Function tracked

    • Retrieve a tracked element by its id. Will return null if an element corresponding to a given id is not found.

      Parameters

      • id: string

        The id of the tracked element to retrieve

      Returns null | HTMLElement

      The tracked element, or null if not found

      // Access tracked elements from anywhere in your code
      function showSidebar() {
      const sidebar = tracked('app-sidebar');
      if (sidebar) {
      sidebar.style.display = 'block';
      }
      }