Class: EditorLifecycleEvent

sync.api.Workspace. EditorLifecycleEvent


new EditorLifecycleEvent(type, editor)

Event generated when an editor is loaded.

Examples of listening for this event:

workspace.listen(sync.api.Workspace.EventType.EDITOR_LOADED, function(e) {
  // e is of type sync.api.Workspace.EditorLifecycleEvent
});
workspace.listen(sync.api.Workspace.EventType.EDITOR_DISPOSED, function(e) {
  // e is of type sync.api.Workspace.EditorLifecycleEvent
});
workspace.listen(sync.api.Workspace.EventType.BEFORE_EDITOR_DISPOSED, function(e) {
  // e is of type sync.api.Workspace.EditorLifecycleEvent
});
Parameters:
Name Type Description
type string The type of the event.
editor sync.api.Editor The editor that was changed.

Members


editor :sync.api.Editor

The editor which has been loaded.
Type:

type :string

The event type, one of the events here sync.api.Workspace.EventType.
Type:
  • string