Add runtime event for when the project is loaded ()

This commit is contained in:
Katie Broida 2018-10-30 15:26:22 -04:00 committed by GitHub
parent fd5e178d3b
commit 6ef600dc2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 0 deletions
src/engine

View file

@ -402,6 +402,14 @@ class Runtime extends EventEmitter {
return 'VISUAL_REPORT';
}
/**
* Event name for project loaded report.
* @const {string}
*/
static get PROJECT_LOADED () {
return 'PROJECT_LOADED';
}
/**
* Event name for targets update report.
* @const {string}
@ -1913,6 +1921,13 @@ class Runtime extends EventEmitter {
return this._cloneCounter < Runtime.MAX_CLONES;
}
/**
* Report that the project has loaded in the Virtual Machine.
*/
emitProjectLoaded () {
this.emit(Runtime.PROJECT_LOADED);
}
/**
* Report that a new target has been created, possibly by cloning an existing target.
* @param {Target} newTarget - the newly created target.