feat: add more tracking events (#6866)

Added most tracking events

what is missing:
- still need a way to track events in blocksuite
- some events may not 100% accurate of the one defined in the PRD
This commit is contained in:
pengx17
2024-05-13 03:36:32 +00:00
parent bd1733b2a9
commit 3e23878e0f
37 changed files with 433 additions and 69 deletions

View File

@@ -37,6 +37,10 @@ export class EventBus {
}
}
get root(): EventBus {
return this.parent?.root ?? this;
}
on<T>(id: string, listener: (event: FrameworkEvent<T>) => void) {
if (!this.listeners[id]) {
this.listeners[id] = [];