MCPcopy
hub / github.com/streamlit/streamlit / getActiveIds

Method getActiveIds

frontend/lib/src/render-tree/AppRoot.ts:400–412  ·  view source on GitHub ↗

* Return all active element IDs and block IDs in the tree. * Block IDs are collected from blocks that have a stable identity * (e.g. keyed layout containers), and are needed to prevent * elementStates entries from being garbage-collected.

()

Source from the content-addressed store, hash-verified

398 * elementStates entries from being garbage-collected.
399 */
400 public getActiveIds(): {
401 elements: Set<Element>
402 blockIds: Set<string>
403 } {
404 const visitor = new ElementsSetVisitor()
405
406 this.main.accept(visitor)
407 this.sidebar.accept(visitor)
408 this.event.accept(visitor)
409 this.bottom.accept(visitor)
410
411 return { elements: visitor.elements, blockIds: visitor.blockIds }
412 }
413
414 private addElement(
415 deltaPath: number[],

Callers 2

getElementsMethod · 0.95

Calls 1

acceptMethod · 0.65

Tested by

no test coverage detected