ref(feedback): emit api feedback submitted on completion (#4499)

* ref(feedback): emit api feedback submitted on completion

Compared to firing the event on submission because
the submission ajax will not be completed at that
time..

* squash: update package.json
This commit is contained in:
virtuacoplenny
2019-07-31 10:59:22 -07:00
committed by GitHub
parent e7144eb674
commit 732f2c1963
8 changed files with 56 additions and 22 deletions

View File

@@ -627,10 +627,14 @@ class API {
* has been submitted. Intended to be used in conjunction with the
* submit-feedback command to get notified if feedback was submitted.
*
* @param {string} error - A failure message, if any.
* @returns {void}
*/
notifyFeedbackSubmitted() {
this._sendEvent({ name: 'feedback-submitted' });
notifyFeedbackSubmitted(error: string) {
this._sendEvent({
name: 'feedback-submitted',
error
});
}
/**