loading code fetching the highlighted snippet
Toggle label-click expansion and watch beforeExpandChange veto decisions stream into a live event log.
clickToExpandNode makes the whole field label a toggle, not just the disclosure
arrow.beforeExpandChange runs before every expand or collapse and can veto
the change — return false to keep a node as-is.