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
Example
// Access tracked elements from anywhere in your code functionshowSidebar() { constsidebar=tracked('app-sidebar'); if (sidebar) { sidebar.style.display='block'; } }
Retrieve a tracked element by its id. Will return null if an element corresponding to a given id is not found.