Use the same function name to bind the OpenID request handler

This commit is contained in:
Travis Ralston 2019-03-23 22:50:26 -06:00
parent d3268801ed
commit 21d52a8311

View File

@ -45,7 +45,7 @@ export default class WidgetMessaging {
this.target = target;
this.fromWidget = global.mxFromWidgetMessaging;
this.toWidget = global.mxToWidgetMessaging;
this._openIdHandlerRef = this._onOpenIdRequest.bind(this);
this._onOpenIdRequest = this._onOpenIdRequest.bind(this);
this.start();
}
@ -115,12 +115,12 @@ export default class WidgetMessaging {
start() {
this.fromWidget.addEndpoint(this.widgetId, this.widgetUrl);
this.fromWidget.addListener("get_openid", this._openIdHandlerRef);
this.fromWidget.addListener("get_openid", this._onOpenIdRequest);
}
stop() {
this.fromWidget.removeEndpoint(this.widgetId, this.widgetUrl);
this.fromWidget.removeListener("get_openid", this._openIdHandlerRef);
this.fromWidget.removeListener("get_openid", this._onOpenIdRequest);
}
async _onOpenIdRequest(ev, rawEv) {