Replace at-/de-tached with dis-connectedCallback
attached() and detached() are Polymer 1 legacy.
Change-Id: Ic86d07bfb95ec316880db261a913004f5a6e5a22
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
index c839118..5a84d9c 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
@@ -281,8 +281,8 @@
reporting = appContext.reportingService;
/** @override */
- attached() {
- super.attached();
+ connectedCallback() {
+ super.connectedCallback();
this.restApiService.getAccount().then(account => {
this._selfAccount = account;
});
@@ -297,14 +297,14 @@
}
/** @override */
- detached() {
- super.detached();
+ disconnectedCallback() {
this.cancelDebouncer(DEBOUNCER_FIRE_UPDATE);
this.cancelDebouncer(DEBOUNCER_STORE);
this.cancelDebouncer(DEBOUNCER_DRAFT_TOAST);
if (this.textarea) {
this.textarea.closeDropdown();
}
+ super.disconnectedCallback();
}
_getAuthor(comment: UIComment) {