BloomJsDevTools class

Runtime diagnostics and inspection interface for development-time tooling.

Note: This is a development-only surface used by browser extensions, dev servers, test runners, and diagnostic consoles to inspect active DOM regions, sentinels, lifecycle events, and component AST trees.

In production builds, listeners and log events should remain unpopulated to avoid unnecessary overhead.

// Listen to framework diagnostic events
final unsubscribe = BloomJsDevTools.addListener((event, data) {
  print('DevTools event: $event, payload: $data');
});

// Serialize an AST node to a JSON map
final snapshot = BloomJsDevTools.snapshotTree(
  Div(className: 'card', text: 'Hello'),
);

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

activeRegionCount int
Current number of actively mounted reactive region scopes in the browser DOM.
getter/setter pair
activeSentinelCount int
Current number of active sentinel comment boundary markers in the browser DOM.
getter/setter pair
eventLog List<BloomDevToolsEvent>
Unmodifiable view of the most recent diagnostic events, ordered from oldest to newest.
no setter

Static Methods

addListener(void listener(String event, Map<String, dynamic> data)) → void Function()
Registers a diagnostic event listener callback.
clearEventLog() → void
Clears the in-memory diagnostic event log without modifying listeners or active counters.
notify(String event, Map<String, dynamic> data) → void
Dispatches a diagnostic event with data to all registered listeners and logs it to eventLog.
snapshotTree(BloomNode node) Map<String, dynamic>
Serializes node and its descendant subtree into a JSON-encodable Map.

Constants

maxEventLogSize → const int
Maximum number of diagnostic events retained in eventLog.