Skip to content

Events and event API definition and documentation #6632

@rachel-fenichel

Description

@rachel-fenichel

Define the developer-facing API for events and document it.

Some open questions:

  • Should developers be able to define their own types of events?
    • Currently yes
  • If yes, how will Blockly interact with those events?
    • Currently Blockly will never fire custom events, but can run them if they are in the undo/redo stack and in the event registry.
  • Should developers be able to redefine basic event types?
    • Currently it might technically be possible (e.g. unregister and reregister the block change event type) but not documented and not recommended.
    • Rachel and Maribeth think external developers should not be allowed to do this.
  • Should internal uses of events go through the event registry?
    • If we don't allow redefinition of events and we're able to resolve circular dependencies, directly using event constructors would improve our types.

We have many bugs about specific parts of our event code. This is an umbrella to collect those for discussion. Any work on this should involve a design doc and also documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions