fix(form): add elements to Form Registrar Manager when connected

This commit is contained in:
Tom Herni 2019-08-01 20:45:55 +02:00 committed by Thijs Louisse
parent a4f9465e58
commit 3d16dc7b0c

View file

@ -28,12 +28,18 @@ export const FormRegistrarMixin = dedupeMixin(
this.registrationReady = new Promise(resolve => {
this.__resolveRegistrationReady = resolve;
});
formRegistrarManager.add(this);
this._onRequestToAddFormElement = this._onRequestToAddFormElement.bind(this);
this.addEventListener('form-element-register', this._onRequestToAddFormElement);
}
connectedCallback() {
if (super.connectedCallback) {
super.connectedCallback();
}
formRegistrarManager.add(this);
}
disconnectedCallback() {
if (super.disconnectedCallback) {
super.disconnectedCallback();