Skip to content

CAN's create-note handler should listen for COMMAND_ADD

CAN's create-note handler is intended to add a new note at the note's address using the current state of the scratchfile to determine which note is added.

When the COMMAND_ADD event is detected, the create-note handler should take the current scratchfile's AST and store it at the address calculated for that AST earlier within the CAN notebook.

Once the create-note handler has successfully done this it should fire a NOTE_CREATED event. If it fails, it should fire a NOTE-CREATED-ERROR event.