From ab57ce3744b91de5627c2d7a9e324be49ae6a98a Mon Sep 17 00:00:00 2001 From: Tao Zhou Date: Sun, 12 Jan 2020 15:20:39 +0100 Subject: [PATCH] Add more jsdoc for closure checks 1. add `@extends` for all polymer elements 2. add `@override` for all lifecycle methods 3. fix a wrong type in gr-auth Change-Id: Id9dea76b169197084d2e0b5f267459cdc4aaec3e --- .../behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js | 1 + .../keyboard-shortcut-behavior.html | 2 ++ .../elements/admin/gr-access-section/gr-access-section.js | 2 ++ .../admin/gr-admin-group-list/gr-admin-group-list.js | 2 ++ .../app/elements/admin/gr-admin-view/gr-admin-view.js | 2 ++ .../gr-confirm-delete-item-dialog.js | 1 + .../gr-create-change-dialog/gr-create-change-dialog.js | 2 ++ .../admin/gr-create-group-dialog/gr-create-group-dialog.js | 1 + .../gr-create-pointer-dialog/gr-create-pointer-dialog.js | 1 + .../admin/gr-create-repo-dialog/gr-create-repo-dialog.js | 1 + .../elements/admin/gr-group-audit-log/gr-group-audit-log.js | 3 +++ .../app/elements/admin/gr-group-members/gr-group-members.js | 2 ++ polygerrit-ui/app/elements/admin/gr-group/gr-group.js | 2 ++ .../app/elements/admin/gr-permission/gr-permission.js | 3 +++ .../gr-plugin-config-array-editor.js | 1 + .../app/elements/admin/gr-plugin-list/gr-plugin-list.js | 2 ++ .../app/elements/admin/gr-repo-access/gr-repo-access.js | 2 ++ .../app/elements/admin/gr-repo-command/gr-repo-command.js | 1 + .../app/elements/admin/gr-repo-commands/gr-repo-commands.js | 2 ++ .../elements/admin/gr-repo-dashboards/gr-repo-dashboards.js | 1 + .../admin/gr-repo-detail-list/gr-repo-detail-list.js | 1 + .../app/elements/admin/gr-repo-list/gr-repo-list.js | 2 ++ .../admin/gr-repo-plugin-config/gr-repo-plugin-config.js | 1 + polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js | 2 ++ .../app/elements/admin/gr-rule-editor/gr-rule-editor.js | 4 ++++ .../change-list/gr-change-list-item/gr-change-list-item.js | 2 ++ .../change-list/gr-change-list-view/gr-change-list-view.js | 3 +++ .../elements/change-list/gr-change-list/gr-change-list.js | 4 ++++ .../gr-create-change-help/gr-create-change-help.js | 1 + .../gr-create-commands-dialog/gr-create-commands-dialog.js | 1 + .../gr-create-destination-dialog.js | 1 + .../change-list/gr-dashboard-view/gr-dashboard-view.js | 2 ++ .../change-list/gr-embed-dashboard/gr-embed-dashboard.js | 1 + .../elements/change-list/gr-repo-header/gr-repo-header.js | 1 + .../elements/change-list/gr-user-header/gr-user-header.js | 3 +++ .../elements/change/gr-change-actions/gr-change-actions.js | 3 +++ .../change/gr-change-metadata/gr-change-metadata.js | 1 + .../change/gr-change-requirements/gr-change-requirements.js | 1 + .../app/elements/change/gr-change-view/gr-change-view.js | 4 ++++ .../app/elements/change/gr-comment-list/gr-comment-list.js | 1 + .../app/elements/change/gr-commit-info/gr-commit-info.js | 1 + .../gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js | 1 + .../gr-confirm-cherrypick-conflict-dialog.js | 1 + .../gr-confirm-cherrypick-dialog.js | 1 + .../change/gr-confirm-move-dialog/gr-confirm-move-dialog.js | 1 + .../gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js | 1 + .../gr-confirm-revert-dialog/gr-confirm-revert-dialog.js | 1 + .../gr-confirm-revert-submission-dialog.js | 1 + .../gr-confirm-submit-dialog/gr-confirm-submit-dialog.js | 1 + .../change/gr-download-dialog/gr-download-dialog.js | 2 ++ .../change/gr-file-list-header/gr-file-list-header.js | 1 + .../app/elements/change/gr-file-list/gr-file-list.js | 4 ++++ .../change/gr-included-in-dialog/gr-included-in-dialog.js | 1 + .../change/gr-label-score-row/gr-label-score-row.js | 1 + .../app/elements/change/gr-label-scores/gr-label-scores.js | 1 + polygerrit-ui/app/elements/change/gr-message/gr-message.js | 3 +++ .../elements/change/gr-messages-list/gr-messages-list.js | 1 + .../gr-related-changes-list/gr-related-changes-list.js | 1 + .../app/elements/change/gr-reply-dialog/gr-reply-dialog.js | 3 +++ .../elements/change/gr-reviewer-list/gr-reviewer-list.js | 1 + .../app/elements/change/gr-thread-list/gr-thread-list.js | 1 + .../change/gr-upload-help-dialog/gr-upload-help-dialog.js | 2 ++ .../core/gr-account-dropdown/gr-account-dropdown.js | 3 +++ .../app/elements/core/gr-error-dialog/gr-error-dialog.js | 1 + .../app/elements/core/gr-error-manager/gr-error-manager.js | 3 +++ .../core/gr-key-binding-display/gr-key-binding-display.js | 1 + .../gr-keyboard-shortcuts-dialog.js | 4 ++++ .../app/elements/core/gr-main-header/gr-main-header.js | 4 ++++ polygerrit-ui/app/elements/core/gr-router/gr-router.js | 1 + .../app/elements/core/gr-search-bar/gr-search-bar.js | 1 + .../app/elements/core/gr-smart-search/gr-smart-search.js | 2 ++ .../app/elements/diff/gr-comment-api/gr-comment-api.js | 2 ++ .../elements/diff/gr-coverage-layer/gr-coverage-layer.js | 1 + .../app/elements/diff/gr-diff-cursor/gr-diff-cursor.js | 4 ++++ .../elements/diff/gr-diff-highlight/gr-diff-highlight.js | 2 ++ .../app/elements/diff/gr-diff-host/gr-diff-host.js | 5 +++++ .../diff/gr-diff-mode-selector/gr-diff-mode-selector.js | 1 + .../gr-diff-preferences-dialog.js | 1 + .../elements/diff/gr-diff-processor/gr-diff-processor.js | 4 ++++ .../elements/diff/gr-diff-selection/gr-diff-selection.js | 3 +++ .../app/elements/diff/gr-diff-view/gr-diff-view.js | 2 ++ polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js | 4 ++++ .../diff/gr-patch-range-select/gr-patch-range-select.js | 1 + .../diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js | 1 + .../diff/gr-selection-action-box/gr-selection-action-box.js | 2 ++ .../app/elements/diff/gr-syntax-layer/gr-syntax-layer.js | 1 + .../gr-documentation-search/gr-documentation-search.js | 2 ++ .../elements/edit/gr-default-editor/gr-default-editor.js | 1 + .../app/elements/edit/gr-edit-controls/gr-edit-controls.js | 1 + .../edit/gr-edit-file-controls/gr-edit-file-controls.js | 1 + .../app/elements/edit/gr-editor-view/gr-editor-view.js | 3 +++ polygerrit-ui/app/elements/gr-app-element.js | 3 +++ polygerrit-ui/app/elements/gr-app.js | 1 + .../app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js | 1 + .../plugins/gr-endpoint-decorator/gr-endpoint-decorator.js | 3 +++ .../elements/plugins/gr-endpoint-param/gr-endpoint-param.js | 1 + .../elements/plugins/gr-external-style/gr-external-style.js | 3 +++ .../app/elements/plugins/gr-plugin-host/gr-plugin-host.js | 1 + .../elements/plugins/gr-popup-interface/gr-plugin-popup.js | 1 + .../elements/plugins/gr-theme-api/gr-theme-api_test.html | 1 + .../elements/settings/gr-account-info/gr-account-info.js | 1 + .../settings/gr-agreements-list/gr-agreements-list.js | 2 ++ .../gr-change-table-editor/gr-change-table-editor.js | 1 + .../app/elements/settings/gr-cla-view/gr-cla-view.js | 2 ++ .../settings/gr-edit-preferences/gr-edit-preferences.js | 1 + .../elements/settings/gr-email-editor/gr-email-editor.js | 1 + .../app/elements/settings/gr-gpg-editor/gr-gpg-editor.js | 1 + .../app/elements/settings/gr-group-list/gr-group-list.js | 1 + .../elements/settings/gr-http-password/gr-http-password.js | 2 ++ .../app/elements/settings/gr-identities/gr-identities.js | 1 + .../app/elements/settings/gr-menu-editor/gr-menu-editor.js | 1 + .../gr-registration-dialog/gr-registration-dialog.js | 2 ++ .../elements/settings/gr-settings-view/gr-settings-item.js | 1 + .../settings/gr-settings-view/gr-settings-menu-item.js | 1 + .../elements/settings/gr-settings-view/gr-settings-view.js | 3 +++ .../app/elements/settings/gr-ssh-editor/gr-ssh-editor.js | 1 + .../gr-watched-projects-editor.js | 1 + .../app/elements/shared/gr-account-chip/gr-account-chip.js | 2 ++ .../elements/shared/gr-account-entry/gr-account-entry.js | 2 ++ .../elements/shared/gr-account-label/gr-account-label.js | 2 ++ .../app/elements/shared/gr-account-link/gr-account-link.js | 1 + .../app/elements/shared/gr-account-list/gr-account-list.js | 2 ++ polygerrit-ui/app/elements/shared/gr-alert/gr-alert.js | 3 +++ .../gr-autocomplete-dropdown/gr-autocomplete-dropdown.js | 1 + .../app/elements/shared/gr-autocomplete/gr-autocomplete.js | 3 +++ polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js | 2 ++ polygerrit-ui/app/elements/shared/gr-button/gr-button.js | 3 +++ .../app/elements/shared/gr-change-star/gr-change-star.js | 1 + .../elements/shared/gr-change-status/gr-change-status.js | 1 + .../elements/shared/gr-comment-thread/gr-comment-thread.js | 3 +++ polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js | 3 +++ .../gr-confirm-delete-comment-dialog.js | 1 + .../elements/shared/gr-copy-clipboard/gr-copy-clipboard.js | 1 + .../elements/shared/gr-cursor-manager/gr-cursor-manager.js | 2 ++ .../elements/shared/gr-date-formatter/gr-date-formatter.js | 2 ++ polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js | 2 ++ .../shared/gr-diff-preferences/gr-diff-preferences.js | 1 + .../shared/gr-download-commands/gr-download-commands.js | 2 ++ .../elements/shared/gr-dropdown-list/gr-dropdown-list.js | 1 + .../app/elements/shared/gr-dropdown/gr-dropdown.js | 1 + .../shared/gr-editable-content/gr-editable-content.js | 1 + .../elements/shared/gr-editable-label/gr-editable-label.js | 2 ++ .../app/elements/shared/gr-fixed-panel/gr-fixed-panel.js | 3 +++ .../elements/shared/gr-formatted-text/gr-formatted-text.js | 2 ++ .../app/elements/shared/gr-hovercard/gr-hovercard.js | 4 ++++ .../shared/gr-js-api-interface/gr-js-api-interface.js | 1 + .../app/elements/shared/gr-label-info/gr-label-info.js | 1 + polygerrit-ui/app/elements/shared/gr-label/gr-label.js | 1 + .../gr-labeled-autocomplete/gr-labeled-autocomplete.js | 1 + .../app/elements/shared/gr-lib-loader/gr-lib-loader.js | 1 + .../app/elements/shared/gr-limited-text/gr-limited-text.js | 6 +++--- .../app/elements/shared/gr-linked-chip/gr-linked-chip.js | 1 + .../app/elements/shared/gr-linked-text/gr-linked-text.js | 1 + .../app/elements/shared/gr-list-view/gr-list-view.js | 2 ++ polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js | 2 ++ .../app/elements/shared/gr-page-nav/gr-page-nav.js | 3 +++ .../shared/gr-repo-branch-picker/gr-repo-branch-picker.js | 3 +++ .../app/elements/shared/gr-rest-api-interface/gr-auth.js | 3 ++- .../shared/gr-rest-api-interface/gr-rest-api-interface.js | 2 ++ polygerrit-ui/app/elements/shared/gr-select/gr-select.js | 3 +++ .../elements/shared/gr-shell-command/gr-shell-command.js | 1 + polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js | 1 + .../app/elements/shared/gr-textarea/gr-textarea.js | 2 ++ .../shared/gr-tooltip-content/gr-tooltip-content.js | 1 + polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip.js | 1 + polygerrit-ui/app/samples/bind-parameters.html | 1 + polygerrit-ui/app/samples/repo-command.html | 1 + polygerrit-ui/app/samples/some-screen.html | 1 + 168 files changed, 294 insertions(+), 4 deletions(-) diff --git a/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js b/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js index 73b8261079..19d08ffd46 100644 --- a/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js +++ b/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js @@ -49,6 +49,7 @@ }, }, + /** @override */ detached() { this._handleHideTooltip(); }, diff --git a/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.html b/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.html index d4e2c72c0c..8a1ed87e00 100644 --- a/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.html +++ b/polygerrit-ui/app/behaviors/keyboard-shortcut-behavior/keyboard-shortcut-behavior.html @@ -540,6 +540,7 @@ shortcuts are. } }, + /** @override */ attached() { const shortcuts = shortcutManager.attachHost(this); if (!shortcuts) { return; } @@ -559,6 +560,7 @@ shortcuts are. } }, + /** @override */ detached() { if (shortcutManager.detachHost(this)) { this.removeOwnKeyBindings(); diff --git a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js index 8c17c499a2..a421043a52 100644 --- a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js +++ b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js @@ -40,6 +40,7 @@ /** * @appliesMixin Gerrit.AccessMixin * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrAccessSection extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, @@ -84,6 +85,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('access-saved', diff --git a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js index 5a625842c5..96008b71e7 100644 --- a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js +++ b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.ListViewMixin + * @extends Polymer.Element */ class GrAdminGroupList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -77,6 +78,7 @@ }; } + /** @override */ attached() { super.attached(); this._getCreateGroupCapability(); diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js index afc373dcd1..e300c9038e 100644 --- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js +++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js @@ -23,6 +23,7 @@ * @appliesMixin Gerrit.AdminNavMixin * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrAdminView extends Polymer.mixinBehaviors( [ Gerrit.AdminNavBehavior, @@ -82,6 +83,7 @@ ]; } + /** @override */ attached() { super.attached(); this.reload(); diff --git a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js index 7400d2ad3d..3fde41095d 100644 --- a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js @@ -25,6 +25,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmDeleteItemDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js index eb96794510..3b853040b8 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js @@ -24,6 +24,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrCreateChangeDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -64,6 +65,7 @@ }; } + /** @override */ attached() { super.attached(); if (!this.repoName) { return Promise.resolve(); } diff --git a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js index 40729863c7..8a4edab7fe 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrCreateGroupDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js index cf59af885d..2d6b4aa241 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js @@ -25,6 +25,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrCreatePointerDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js index a6da3a12ff..290f0258a6 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrCreateRepoDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js index 57b9689e3d..11517d6a4c 100644 --- a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js +++ b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.ListViewMixin + * @extends Polymer.Element */ class GrGroupAuditLog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -42,11 +43,13 @@ }; } + /** @override */ attached() { super.attached(); this.fire('title-change', {title: 'Audit Log'}); } + /** @override */ ready() { super.ready(); this._getAuditLogs(); diff --git a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js index f3a7ec7bbe..8c29f73a64 100644 --- a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js +++ b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js @@ -27,6 +27,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrGroupMembers extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -76,6 +77,7 @@ }; } + /** @override */ attached() { super.attached(); this._loadGroupDetails(); diff --git a/polygerrit-ui/app/elements/admin/gr-group/gr-group.js b/polygerrit-ui/app/elements/admin/gr-group/gr-group.js index 6597b4df32..42846f4e73 100644 --- a/polygerrit-ui/app/elements/admin/gr-group/gr-group.js +++ b/polygerrit-ui/app/elements/admin/gr-group/gr-group.js @@ -32,6 +32,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrGroup extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -105,6 +106,7 @@ ]; } + /** @override */ attached() { super.attached(); this._loadGroup(); diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js index 040eabf3cc..e719154dec 100644 --- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js +++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js @@ -37,6 +37,7 @@ * Fired when a permission that was previously added was removed. * * @event added-permission-removed + * @extends Polymer.Element */ class GrPermission extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, @@ -94,12 +95,14 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('access-saved', () => this._handleAccessSaved()); } + /** @override */ ready() { super.ready(); this._setupValues(); diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor.js b/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor.js index c0ad9d42b6..92a8655107 100644 --- a/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor.js +++ b/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrPluginConfigArrayEditor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js index 262f3d56be..5dd6ec2a4c 100644 --- a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js +++ b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.ListViewMixin + * @extends Polymer.Element */ class GrPluginList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -74,6 +75,7 @@ }; } + /** @override */ attached() { super.attached(); this.fire('title-change', {title: 'Plugins'}); diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js index bffad1c5d4..b3507028c0 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js @@ -72,6 +72,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrRepoAccess extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, @@ -128,6 +129,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('access-modified', diff --git a/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command.js b/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command.js index 48e4c01015..622bfe4738 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrRepoCommand extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js index 558f004374..80b187a419 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js @@ -28,6 +28,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrRepoCommands extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -50,6 +51,7 @@ }; } + /** @override */ attached() { super.attached(); this._loadRepo(); diff --git a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js index 00611b608c..8e09263938 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrRepoDashboards extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js index 109aa106cb..ccfdfc67a1 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js @@ -28,6 +28,7 @@ * @appliesMixin Gerrit.ListViewMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrRepoDetailList extends Polymer.mixinBehaviors( [ Gerrit.ListViewBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js index 3e706b5dbc..c509717dc5 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.ListViewMixin + * @extends Polymer.Element */ class GrRepoList extends Polymer.mixinBehaviors( [ Gerrit.ListViewBehavior, @@ -78,6 +79,7 @@ }; } + /** @override */ attached() { super.attached(); this._getCreateRepoCapability(); diff --git a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js index 404f93c590..7368eb84fa 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.RepoPluginConfigMixin + * @extends Polymer.Element */ class GrRepoPluginConfig extends Polymer.mixinBehaviors( [ Gerrit.RepoPluginConfig, diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js index a2097f9f09..f6328dec41 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js +++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js @@ -53,6 +53,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrRepo extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -123,6 +124,7 @@ ]; } + /** @override */ attached() { super.attached(); this._loadRepo(); diff --git a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js index 24e95b6474..ac98d33b14 100644 --- a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js +++ b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js @@ -69,6 +69,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrRuleEditor extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, @@ -118,12 +119,14 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('access-saved', () => this._handleAccessSaved()); } + /** @override */ ready() { super.ready(); // Called on ready rather than the observer because when new rules are @@ -132,6 +135,7 @@ this._setupValues(this.rule); } + /** @override */ attached() { super.attached(); if (!this.rule) { return; } // Check needed for test purposes. diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js index 9ce5e462e2..013b44bafb 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js +++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js @@ -30,6 +30,7 @@ * @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrChangeListItem extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -74,6 +75,7 @@ }; } + /** @override */ attached() { super.attached(); Gerrit.awaitPluginsLoaded().then(() => { diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js index 4e08b5c15f..e3a3b31e24 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js +++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js @@ -33,6 +33,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrChangeListView extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -133,6 +134,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('next-page', @@ -141,6 +143,7 @@ () => this._handlePreviousPage()); } + /** @override */ attached() { super.attached(); this._loadPreferences(); diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js index 618b78f2cb..2d6b4403a7 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js +++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js @@ -29,6 +29,7 @@ * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.RESTClientMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrChangeList extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -135,17 +136,20 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('keydown', e => this._scopedKeydownHandler(e)); } + /** @override */ ready() { super.ready(); this._ensureAttribute('tabindex', 0); } + /** @override */ attached() { super.attached(); Gerrit.awaitPluginsLoaded().then(() => { diff --git a/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help.js b/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help.js index e6caacb302..64d2486b8f 100644 --- a/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help.js +++ b/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrCreateChangeHelp extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog.js b/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog.js index 303128b42c..7abd78417b 100644 --- a/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog.js +++ b/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog.js @@ -23,6 +23,7 @@ PUSH_PREFIX: 'git push origin HEAD:refs/for/', }; + /** @extends Polymer.Element */ class GrCreateCommandsDialog extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog.js b/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog.js index cbc7bcda81..35f7450a96 100644 --- a/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog.js +++ b/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog.js @@ -22,6 +22,7 @@ * name and the branch name. * * @event confirm + * @extends Polymer.Element */ class GrCreateDestinationDialog extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( diff --git a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js index 05f1abeba0..d0e1db2e81 100644 --- a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js +++ b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrDashboardView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -94,6 +95,7 @@ ); } + /** @override */ attached() { super.attached(); this._loadPreferences(); diff --git a/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard.js b/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard.js index 96dcb982af..de0a56e012 100644 --- a/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard.js +++ b/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrEmbedDashboard extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header.js b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header.js index d4bd1df7bd..c0e472aa07 100644 --- a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header.js +++ b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrRepoHeader extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js index 40f0b73e13..2fc817082d 100644 --- a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js +++ b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js @@ -17,6 +17,9 @@ (function() { 'use strict'; + /** + * @extends Polymer.Element + */ class GrUserHeader extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js index 1034389ed2..2c4ca82caa 100644 --- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js +++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js @@ -196,6 +196,7 @@ * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrChangeActions extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -432,6 +433,7 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('fullscreen-overlay-opened', @@ -440,6 +442,7 @@ () => this._handleShowBackgroundContent()); } + /** @override */ ready() { super.ready(); this.$.jsAPI.addElement(this.$.jsAPI.Element.CHANGE_ACTIONS, this); diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js index e13b4629c3..3237d72d2e 100644 --- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js +++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js @@ -50,6 +50,7 @@ /** * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrChangeMetadata extends Polymer.mixinBehaviors( [ Gerrit.RESTClientBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js index 346fee3247..a413c6fd2b 100644 --- a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js +++ b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrChangeRequirements extends Polymer.mixinBehaviors( [ Gerrit.RESTClientBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js index 4d2f1dbe53..502cb27e57 100644 --- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js +++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js @@ -68,6 +68,7 @@ * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrChangeView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -324,6 +325,7 @@ }; } + /** @override */ created() { super.created(); @@ -346,6 +348,7 @@ () => this._handleReloadCommentThreads()); } + /** @override */ attached() { super.attached(); this._getServerConfig().then(config => { @@ -391,6 +394,7 @@ this.listen(document, 'visibilitychange', '_handleVisibilityChange'); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'scroll', '_handleScroll'); diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js index 3de51a7ed4..58bdbbc2ea 100644 --- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js +++ b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js @@ -21,6 +21,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrCommentList extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info.js b/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info.js index 2a3fe89405..a339865a38 100644 --- a/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info.js +++ b/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrCommitInfo extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js index eb6f5f3440..555c605601 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrConfirmAbandonDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js index 0b3639ffda..35e9afb2b2 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmCherrypickConflictDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js index 6b01465684..2b10a9749c 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js @@ -21,6 +21,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmCherrypickDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js index d595f48198..feb3d2f49c 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js @@ -21,6 +21,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmMoveDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js index 71694374c3..607f5876a0 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrConfirmRebaseDialog extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js index 379226ac9e..bf727ec861 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmRevertDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js index 51698bed95..d59f5cd1b4 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js @@ -23,6 +23,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmRevertSubmissionDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js index b4d3595aa0..ea8bdb5956 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrConfirmSubmitDialog extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js index 72ad5d2c0d..17c6f5048e 100644 --- a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js @@ -21,6 +21,7 @@ * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrDownloadDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -54,6 +55,7 @@ }; } + /** @override */ ready() { super.ready(); this._ensureAttribute('role', 'dialog'); diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js index a611250fbe..5828006861 100644 --- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js +++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js @@ -24,6 +24,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.PatchSetMixin + * @extends Polymer.Element */ class GrFileListHeader extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js index 90ab96c45b..0bc1a22b59 100644 --- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js +++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js @@ -48,6 +48,7 @@ * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PathListMixin + * @extends Polymer.Element */ class GrFileList extends Polymer.mixinBehaviors( [ Gerrit.AsyncForeachBehavior, @@ -236,12 +237,14 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('keydown', e => this._scopedKeydownHandler(e)); } + /** @override */ attached() { super.attached(); Gerrit.awaitPluginsLoaded().then(() => { @@ -265,6 +268,7 @@ }); } + /** @override */ detached() { super.detached(); this._cancelDiffs(); diff --git a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js index 134ce1005f..01c9b6ee59 100644 --- a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrIncludedInDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js index abfe469ae8..1f9845ea1e 100644 --- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js +++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrLabelScoreRow extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js index ce2a3ef729..0cbf2c73eb 100644 --- a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js +++ b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrLabelScores extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message.js b/polygerrit-ui/app/elements/change/gr-message/gr-message.js index 28348ba519..59f12f56b8 100644 --- a/polygerrit-ui/app/elements/change/gr-message/gr-message.js +++ b/polygerrit-ui/app/elements/change/gr-message/gr-message.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrMessage extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -113,12 +114,14 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('click', e => this._handleClick(e)); } + /** @override */ ready() { super.ready(); this.$.restAPI.getConfig().then(config => { diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js index 49ff60acc5..2c47dc188c 100644 --- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js +++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js @@ -25,6 +25,7 @@ SHOW_MORE: 'show-more-messages', }; + /** @extends Polymer.Element */ class GrMessagesList extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js index c925142f21..d4a239846e 100644 --- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js +++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js @@ -21,6 +21,7 @@ * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrRelatedChangesList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js index 18288089d5..90f8540adf 100644 --- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js @@ -58,6 +58,7 @@ * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrReplyDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -249,6 +250,7 @@ ]; } + /** @override */ attached() { super.attached(); this._getAccount().then(account => { @@ -256,6 +258,7 @@ }); } + /** @override */ ready() { super.ready(); this.$.jsAPI.addElement(this.$.jsAPI.Element.REPLY_DIALOG, this); diff --git a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js index 7bef5dd7d5..ddc62753e5 100644 --- a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js +++ b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrReviewerList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js index de58d72672..9e42de1675 100644 --- a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js +++ b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js @@ -21,6 +21,7 @@ * Fired when a comment is saved or deleted * * @event thread-list-modified + * @extends Polymer.Element */ class GrThreadList extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( diff --git a/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js b/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js index 0441129905..60cbd429ca 100644 --- a/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js @@ -29,6 +29,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrUploadHelpDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -65,6 +66,7 @@ }; } + /** @override */ attached() { super.attached(); this.$.restAPI.getLoggedIn() diff --git a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js index 1cbbf3e4dd..66c00f9609 100644 --- a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js +++ b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js @@ -21,6 +21,7 @@ /** * @appliesMixin Gerrit.DisplayNameMixin + * @extends Polymer.Element */ class GrAccountDropdown extends Polymer.mixinBehaviors( [ Gerrit.DisplayNameBehavior, @@ -50,6 +51,7 @@ }; } + /** @override */ attached() { super.attached(); this._handleLocationChange(); @@ -66,6 +68,7 @@ }); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'location-change', '_handleLocationChange'); diff --git a/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog.js b/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog.js index 2655140582..db70d57721 100644 --- a/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog.js +++ b/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrErrorDialog extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js index 2a87708472..9ef2461909 100644 --- a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js +++ b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js @@ -28,6 +28,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrErrorManager extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -74,6 +75,7 @@ this._authErrorHandlerDeregistrationHook; } + /** @override */ attached() { super.attached(); this.listen(document, 'server-error', '_handleServerError'); @@ -89,6 +91,7 @@ }); } + /** @override */ detached() { super.detached(); this._clearHideAlertHandle(); diff --git a/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display.js b/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display.js index 2b86170e10..3d424bc8dc 100644 --- a/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display.js +++ b/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrKeyBindingDisplay extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js index 788c9e068d..4630ca7a50 100644 --- a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js +++ b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrKeyboardShortcutsDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -59,17 +60,20 @@ }; } + /** @override */ ready() { super.ready(); this._ensureAttribute('role', 'dialog'); } + /** @override */ attached() { super.attached(); this.addKeyboardShortcutDirectoryListener( this._onDirectoryUpdated.bind(this)); } + /** @override */ detached() { super.detached(); this.removeKeyboardShortcutDirectoryListener( diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js index 07cac73e87..d5eeee81c9 100644 --- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js +++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js @@ -74,6 +74,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.DocsUrlMixin * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrMainHeader extends Polymer.mixinBehaviors( [ Gerrit.AdminNavBehavior, @@ -150,11 +151,13 @@ ]; } + /** @override */ ready() { super.ready(); this._ensureAttribute('role', 'banner'); } + /** @override */ attached() { super.attached(); this._loadAccount(); @@ -162,6 +165,7 @@ this.listen(window, 'location-change', '_handleLocationChange'); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'location-change', '_handleLocationChange'); diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.js b/polygerrit-ui/app/elements/core/gr-router/gr-router.js index 1dfa973ccd..2bd403b3d5 100644 --- a/polygerrit-ui/app/elements/core/gr-router/gr-router.js +++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.js @@ -214,6 +214,7 @@ * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrRouter extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js index 956beea344..335813aa16 100644 --- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js +++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js @@ -107,6 +107,7 @@ /** * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrSearchBar extends Polymer.mixinBehaviors( [ Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js index 662e1b16c1..664d59f61b 100644 --- a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js +++ b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js @@ -23,6 +23,7 @@ /** * @appliesMixin Gerrit.DisplayNameMixin + * @extends Polymer.Element */ class GrSmartSearch extends Polymer.mixinBehaviors( [ Gerrit.DisplayNameBehavior, @@ -56,6 +57,7 @@ }; } + /** @override */ attached() { super.attached(); this.$.restAPI.getConfig().then(cfg => { diff --git a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js index f2b3d903ba..490367af42 100644 --- a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js +++ b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js @@ -466,6 +466,7 @@ /** * @appliesMixin Gerrit.PatchSetMixin + * @extends Polymer.Element */ class GrCommentApi extends Polymer.mixinBehaviors( [ Gerrit.PatchSetBehavior, @@ -480,6 +481,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('reload-drafts', diff --git a/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js b/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js index 201da05508..1bc46746ac 100644 --- a/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js +++ b/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js @@ -24,6 +24,7 @@ [Gerrit.CoverageType.NOT_INSTRUMENTED, 'Not instrumented by any tests.'], ]); + /** @extends Polymer.Element */ class GrCoverageLayer extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js index 591ebfec30..05a7525bb5 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js @@ -35,6 +35,7 @@ const LEFT_SIDE_CLASS = 'target-side-left'; const RIGHT_SIDE_CLASS = 'target-side-right'; + /** @extends Polymer.Element */ class GrDiffCursor extends Polymer.mixinBehaviors([Gerrit.FireBehavior], Polymer.GestureEventListeners( Polymer.LegacyElementMixin(Polymer.Element))) { @@ -105,6 +106,7 @@ ]; } + /** @override */ ready() { super.ready(); Polymer.RenderStatus.afterNextRender(this, () => { @@ -122,12 +124,14 @@ }); } + /** @override */ attached() { super.attached(); // Catch when users are scrolling as the view loads. this.listen(window, 'scroll', '_handleWindowScroll'); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'scroll', '_handleWindowScroll'); diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js index adb1be86c9..e524cd885b 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrDiffHighlight extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -57,6 +58,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('comment-thread-mouseleave', diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js index 300e72a8a3..cb23308dc0 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js @@ -77,6 +77,8 @@ * * Webcomponent fetching diffs and related data from restAPI and passing them * to the presentational gr-diff for rendering. + * + * @extends Polymer.Element */ class GrDiffHost extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -249,6 +251,7 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener( @@ -276,6 +279,7 @@ event => this._handleDiffContextExpanded(event)); } + /** @override */ ready() { super.ready(); if (this._canReload()) { @@ -283,6 +287,7 @@ } } + /** @override */ attached() { super.attached(); this._getLoggedIn().then(loggedIn => { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js b/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js index ae7ef6d211..68bca2333f 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrDiffModeSelector extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js b/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js index 7ed27dd5a5..6aad66c1a1 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrDiffPreferencesDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js index bfccfe9b02..cdd0c7d272 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js @@ -63,6 +63,8 @@ * "expand context" widget. This may require splitting a chunk/group so * that the part that is within the context or has comments is shown, while * the rest is not. + * + * @extends Polymer.Element */ class GrDiffProcessor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( @@ -119,11 +121,13 @@ }; } + /** @override */ attached() { super.attached(); this.listen(window, 'scroll', '_handleWindowScroll'); } + /** @override */ detached() { super.detached(); this.cancel(); diff --git a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js index 37d54c9bf4..359a039577 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js @@ -32,6 +32,7 @@ /** * @appliesMixin Gerrit.DomUtilMixin + * @extends Polymer.Element */ class GrDiffSelection extends Polymer.mixinBehaviors( [ Gerrit.DomUtilBehavior, @@ -58,6 +59,7 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('copy', @@ -66,6 +68,7 @@ e => this._handleDown(e)); } + /** @override */ attached() { super.attached(); this.classList.add(SelectionClass.RIGHT); diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js index 31223709bd..5087d74942 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js @@ -39,6 +39,7 @@ * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrDiffView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -244,6 +245,7 @@ }; } + /** @override */ attached() { super.attached(); this._getLoggedIn().then(loggedIn => { diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js index 4b075e7afe..ef22188c03 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js +++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js @@ -94,6 +94,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.PatchSetMixin + * @extends Polymer.Element */ class GrDiff extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -284,6 +285,7 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('create-range-comment', @@ -292,11 +294,13 @@ () => this._handleRenderContent()); } + /** @override */ attached() { super.attached(); this._observeNodes(); } + /** @override */ detached() { super.detached(); this._unobserveIncrementalNodes(); diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js index 88c3a0ea53..d24e0bc15a 100644 --- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js +++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js @@ -30,6 +30,7 @@ * * @property {string} patchNum * @property {string} basePatchNum + * @extends Polymer.Element */ class GrPatchRangeSelect extends Polymer.mixinBehaviors( [ Gerrit.PatchSetBehavior, diff --git a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js index d9ad795a88..fd94b61cc9 100644 --- a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js +++ b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js @@ -23,6 +23,7 @@ const RANGE_HIGHLIGHT = 'style-scope gr-diff range'; const HOVER_HIGHLIGHT = 'style-scope gr-diff rangeHighlight'; + /** @extends Polymer.Element */ class GrRangedCommentLayer extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js b/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js index 261cd4d358..3d831c9ed9 100644 --- a/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js +++ b/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrSelectionActionBox extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -42,6 +43,7 @@ }; } + /** @override */ created() { super.created(); diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js index 9a15703852..34bda263f3 100644 --- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js +++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js @@ -131,6 +131,7 @@ const GO_BACKSLASH_LITERAL = '\'\\\\\''; const GLOBAL_LT_PATTERN = / this._handleContentChange(e)); } + /** @override */ attached() { super.attached(); this._getEditPrefs().then(prefs => { this._prefs = prefs; }); diff --git a/polygerrit-ui/app/elements/gr-app-element.js b/polygerrit-ui/app/elements/gr-app-element.js index 14570f2145..d39ba58c6d 100644 --- a/polygerrit-ui/app/elements/gr-app-element.js +++ b/polygerrit-ui/app/elements/gr-app-element.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrAppElement extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -114,6 +115,7 @@ }; } + /** @override */ created() { super.created(); this._bindKeyboardShortcuts(); @@ -127,6 +129,7 @@ e => this._handleRpcLog(e)); } + /** @override */ ready() { super.ready(); this.$.reporting.appStarted(); diff --git a/polygerrit-ui/app/elements/gr-app.js b/polygerrit-ui/app/elements/gr-app.js index 46a81eec30..da54ac4719 100644 --- a/polygerrit-ui/app/elements/gr-app.js +++ b/polygerrit-ui/app/elements/gr-app.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrApp extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js b/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js index 946147d4d8..600421bb89 100644 --- a/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js +++ b/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js @@ -41,6 +41,7 @@ return this._hooks[hookName]; }; + /** @constructor */ function GrDomHook(hookName, opt_moduleName) { this._instances = []; this._callbacks = []; diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js index fcf4ce88d9..5a2f104792 100644 --- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js +++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js @@ -19,6 +19,7 @@ const INIT_PROPERTIES_TIMEOUT_MS = 10000; + /** @extends Polymer.Element */ class GrEndpointDecorator extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -46,6 +47,7 @@ }; } + /** @override */ detached() { super.detached(); for (const [el, domHook] of this._domHooks) { @@ -145,6 +147,7 @@ }); } + /** @override */ ready() { super.ready(); Gerrit._endpoints.onNewEndpoint(this.name, this._initModule.bind(this)); diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-param/gr-endpoint-param.js b/polygerrit-ui/app/elements/plugins/gr-endpoint-param/gr-endpoint-param.js index 3010750cfc..bcad7f9ae9 100644 --- a/polygerrit-ui/app/elements/plugins/gr-endpoint-param/gr-endpoint-param.js +++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-param/gr-endpoint-param.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrEndpointParam extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style.js b/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style.js index aa9b13e41e..2e3bee1081 100644 --- a/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style.js +++ b/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrExternalStyle extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -73,11 +74,13 @@ }); } + /** @override */ attached() { super.attached(); this._importAndApply(); } + /** @override */ ready() { super.ready(); Gerrit.awaitPluginsLoaded().then(() => this._importAndApply()); diff --git a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js index cae3a91869..da050fb42a 100644 --- a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js +++ b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrPluginHost extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup.js b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup.js index 412e788a11..30bf6c88ee 100644 --- a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup.js +++ b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup.js @@ -17,6 +17,7 @@ (function(window) { 'use strict'; + /** @extends Polymer.Element */ class GrPluginPopup extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/plugins/gr-theme-api/gr-theme-api_test.html b/polygerrit-ui/app/elements/plugins/gr-theme-api/gr-theme-api_test.html index 9401a15f6e..588facb511 100644 --- a/polygerrit-ui/app/elements/plugins/gr-theme-api/gr-theme-api_test.html +++ b/polygerrit-ui/app/elements/plugins/gr-theme-api/gr-theme-api_test.html @@ -65,6 +65,7 @@ limitations under the License. setup(() => { fixture('header-title'); stub('gr-custom-plugin-header', { + /** @override */ ready() { customHeader = this; }, }); Gerrit._loadPlugins([]); diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js index 9b17fd706c..7bf641dad2 100644 --- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js +++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrAccountInfo extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js index 2886c8785c..67dc0c45aa 100644 --- a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js +++ b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin + * @extends Polymer.Element */ class GrAgreementsList extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -33,6 +34,7 @@ }; } + /** @override */ attached() { super.attached(); this.loadData(); diff --git a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js index aa4e0c5a64..85211265b7 100644 --- a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.ChangeTableMixin + * @extends Polymer.Element */ class GrChangeTableEditor extends Polymer.mixinBehaviors( [ Gerrit.ChangeTableBehavior, diff --git a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js index e146a90a1e..cff1d54bb0 100644 --- a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js +++ b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrClaView extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -45,6 +46,7 @@ }; } + /** @override */ attached() { super.attached(); this.loadData(); diff --git a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.js b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.js index 36e53b029b..95231366b3 100644 --- a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.js +++ b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrEditPreferences extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor.js b/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor.js index 8ec1067348..c60568c1f7 100644 --- a/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrEmailEditor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js index d45edff309..9f04915414 100644 --- a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrGpgEditor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list.js b/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list.js index 6c3a448506..c7b5faad8a 100644 --- a/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list.js +++ b/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrGroupList extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password.js b/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password.js index 5c0a059350..efd0c3943e 100644 --- a/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password.js +++ b/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrHttpPassword extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -30,6 +31,7 @@ }; } + /** @override */ attached() { super.attached(); this.loadData(); diff --git a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js index 8b74130ba4..ac4f9e462c 100644 --- a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js +++ b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js @@ -24,6 +24,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin + * @extends Polymer.Element */ class GrIdentities extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor.js b/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor.js index 5b6c9786b3..0ee232b8cd 100644 --- a/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrMenuEditor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js index 25499d63fc..4bb98d0040 100644 --- a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js +++ b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrRegistrationDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -67,6 +68,7 @@ }; } + /** @override */ ready() { super.ready(); this._ensureAttribute('role', 'dialog'); diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item.js index 9702280391..bae1f3832f 100644 --- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item.js +++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrSettingsItem extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item.js index e08e3d86df..d5a7eb7a26 100644 --- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item.js +++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrSettingsMenuItem extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js index 0236261ab2..78bad8c737 100644 --- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js +++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js @@ -49,6 +49,7 @@ * @appliesMixin Gerrit.DocsUrlMixin * @appliesMixin Gerrit.ChangeTableMixin * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrSettingsView extends Polymer.mixinBehaviors( [ Gerrit.DocsUrlBehavior, @@ -164,6 +165,7 @@ ]; } + /** @override */ attached() { super.attached(); // Polymer 2: anchor tag won't work on shadow DOM @@ -231,6 +233,7 @@ }); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'location-change', '_handleLocationChange'); diff --git a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js index f8e5a5fe71..44fb48cb56 100644 --- a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrSshEditor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.js b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.js index f638a07a89..df115ca7bf 100644 --- a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.js @@ -25,6 +25,7 @@ {name: 'Abandons', key: 'notify_abandoned_changes'}, ]; + /** @extends Polymer.Element */ class GrWatchedProjectsEditor extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js index 2f9572c600..8cd2021fdb 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js +++ b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrAccountChip extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -63,6 +64,7 @@ }; } + /** @override */ ready() { super.ready(); this._getHasAvatars().then(hasAvatars => { diff --git a/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry.js b/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry.js index 0ed3f19d10..d2a111a520 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry.js +++ b/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry.js @@ -20,6 +20,8 @@ /** * gr-account-entry is an element for entering account * and/or group with autocomplete support. + * + * @extends Polymer.Element */ class GrAccountEntry extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js index 1c0cb65a91..34c4cb6262 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js +++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.DisplayNameMixin * @appliesMixin Gerrit.TooltipMixin + * @extends Polymer.Element */ class GrAccountLabel extends Polymer.mixinBehaviors( [ Gerrit.DisplayNameBehavior, @@ -61,6 +62,7 @@ }; } + /** @override */ ready() { super.ready(); if (!this.additionalText) { this.additionalText = ''; } diff --git a/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js b/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js index f23959adfc..b0ce04cfb6 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js +++ b/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin + * @extends Polymer.Element */ class GrAccountLink extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js index 0a4100ca61..7955d502ab 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js +++ b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js @@ -21,6 +21,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrAccountList extends Polymer.mixinBehaviors( [ // Used in the tests for gr-account-list and other elements tests. @@ -113,6 +114,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('remove', diff --git a/polygerrit-ui/app/elements/shared/gr-alert/gr-alert.js b/polygerrit-ui/app/elements/shared/gr-alert/gr-alert.js index 433a57b82b..215f469b30 100644 --- a/polygerrit-ui/app/elements/shared/gr-alert/gr-alert.js +++ b/polygerrit-ui/app/elements/shared/gr-alert/gr-alert.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrAlert extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -52,11 +53,13 @@ }; } + /** @override */ attached() { super.attached(); this.addEventListener('transitionend', this._boundTransitionEndHandler); } + /** @override */ detached() { super.detached(); this.removeEventListener('transitionend', diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js index f5366663a5..5ca95e1892 100644 --- a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js +++ b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js @@ -21,6 +21,7 @@ * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Polymer.IronFitMixin + * @extends Polymer.Element */ class GrAutocompleteDropdown extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js index e2f42b3cfa..60985c1e25 100644 --- a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js +++ b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js @@ -23,6 +23,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrAutocomplete extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -192,11 +193,13 @@ return this.$.input.$.nativeInput || this.$.input.inputElement; } + /** @override */ attached() { super.attached(); this.listen(document.body, 'click', '_handleBodyClick'); } + /** @override */ detached() { super.detached(); this.unlisten(document.body, 'click', '_handleBodyClick'); diff --git a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js index 4238eed69d..efa97cffd7 100644 --- a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js +++ b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin + * @extends Polymer.Element */ class GrAvatar extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -44,6 +45,7 @@ }; } + /** @override */ attached() { super.attached(); Promise.all([ diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button.js b/polygerrit-ui/app/elements/shared/gr-button/gr-button.js index 75efcdc344..abfbb182c9 100644 --- a/polygerrit-ui/app/elements/shared/gr-button/gr-button.js +++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button.js @@ -20,6 +20,7 @@ /** * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.TooltipMixin + * @extends Polymer.Element */ class GrButton extends Polymer.mixinBehaviors( [ Gerrit.KeyboardShortcutBehavior, @@ -68,6 +69,7 @@ ]; } + /** @override */ created() { super.created(); this.addEventListener('click', @@ -76,6 +78,7 @@ e => this._handleKeydown(e)); } + /** @override */ ready() { super.ready(); this._ensureAttribute('role', 'button'); diff --git a/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star.js b/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star.js index 05e759f80f..001632fa41 100644 --- a/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star.js +++ b/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrChangeStar extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js index 35b8ef83a7..7052a6aa3b 100644 --- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js +++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.js @@ -36,6 +36,7 @@ const PRIVATE_TOOLTIP = 'This change is only visible to its owner and ' + 'current reviewers (or anyone with "View Private Changes" permission).'; + /** @extends Polymer.Element */ class GrChangeStatus extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js index a1165ca64d..d8a56f8023 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js +++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js @@ -24,6 +24,7 @@ * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin * @appliesMixin Gerrit.PathListMixin + * @extends Polymer.Element */ class GrCommentThread extends Polymer.mixinBehaviors( [ /** @@ -157,12 +158,14 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('comment-update', e => this._handleCommentUpdate(e)); } + /** @override */ attached() { super.attached(); this._getLoggedIn().then(loggedIn => { diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js index 6449416364..3f4cc69b88 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js +++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js @@ -34,6 +34,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrComment extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -186,6 +187,7 @@ }; } + /** @override */ attached() { super.attached(); if (this.editing) { @@ -198,6 +200,7 @@ }); } + /** @override */ detached() { super.detached(); this.cancelDebouncer('fire-update'); diff --git a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js index 6a4232f540..8d50fe0348 100644 --- a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js +++ b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrConfirmDeleteCommentDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.js b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.js index 6c062f6674..2ce03e34c5 100644 --- a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.js +++ b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.js @@ -19,6 +19,7 @@ const COPY_TIMEOUT_MS = 1000; + /** @extends Polymer.Element */ class GrCopyClipboard extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js index 04724df18c..374204b603 100644 --- a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js +++ b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js @@ -22,6 +22,7 @@ KEEP_VISIBLE: 'keep-visible', }; + /** @extends Polymer.Element */ class GrCursorManager extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -91,6 +92,7 @@ }; } + /** @override */ detached() { super.detached(); this.unsetCursor(); diff --git a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js index 374844d172..8c247e31ee 100644 --- a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js +++ b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js @@ -33,6 +33,7 @@ /** * @appliesMixin Gerrit.TooltipMixin + * @extends Polymer.Element */ class GrDateFormatter extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, @@ -73,6 +74,7 @@ }; } + /** @override */ attached() { super.attached(); this._loadPreferences(); diff --git a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js index d36aa377cb..8d00452f19 100644 --- a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js +++ b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -60,6 +61,7 @@ }; } + /** @override */ ready() { super.ready(); this._ensureAttribute('role', 'dialog'); diff --git a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences.js b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences.js index 6e34bbc46e..c408e5aa72 100644 --- a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences.js +++ b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrDiffPreferences extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js index 9e90ae3c2b..17fafce6f7 100644 --- a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js +++ b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrDownloadCommands extends Polymer.mixinBehaviors( [ Gerrit.RESTClientBehavior, @@ -43,6 +44,7 @@ }; } + /** @override */ attached() { super.attached(); this._getLoggedIn().then(loggedIn => { diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js index 1fa0f1b9b8..06b4a72129 100644 --- a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js +++ b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js @@ -45,6 +45,7 @@ */ Defs.item; + /** @extends Polymer.Element */ class GrDropdownList extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js index 619005adfb..531f2e3aa5 100644 --- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js +++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js @@ -23,6 +23,7 @@ /** * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrDropdown extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js index 0c2d4f5671..7d3308ed53 100644 --- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js +++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrEditableContent extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js index 13000b48c1..ef5bb8ccc7 100644 --- a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js +++ b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js @@ -23,6 +23,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrEditableLabel extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -76,6 +77,7 @@ }; } + /** @override */ ready() { super.ready(); this._ensureAttribute('tabindex', '0'); diff --git a/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js b/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js index 1e8f767735..02e23e84ec 100644 --- a/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js +++ b/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrFixedPanel extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -61,6 +62,7 @@ }; } + /** @override */ attached() { super.attached(); if (this.floatingDisabled) { @@ -76,6 +78,7 @@ this._observer.observe(this.$.header, {childList: true, subtree: true}); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'scroll', '_updateOnScroll'); diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js index 39b114d86e..7483590cf5 100644 --- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js +++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js @@ -20,6 +20,7 @@ // eslint-disable-next-line no-unused-vars const QUOTE_MARKER_PATTERN = /\n\s?>\s/g; + /** @extends Polymer.Element */ class GrFormattedText extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -45,6 +46,7 @@ ]; } + /** @override */ ready() { super.ready(); if (this.noTrailingMargin) { diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js index 37972f91ba..ce34d3ae23 100644 --- a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js +++ b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js @@ -25,6 +25,7 @@ */ const DIAGONAL_OVERFLOW = 15; + /** @extends Polymer.Element */ class GrHovercard extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -91,6 +92,7 @@ }; } + /** @override */ attached() { super.attached(); if (!this._target) { this._target = this.target; } @@ -101,12 +103,14 @@ this.listen(this._target, 'click', 'hide'); } + /** @override */ created() { super.created(); this.addEventListener('mouseleave', e => this.hide(e)); } + /** @override */ ready() { super.ready(); // First, check to see if the container has already been created. diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js index b1675cc6bd..6f9268c97b 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js @@ -39,6 +39,7 @@ /** * @appliesMixin Gerrit.PatchSetMixin + * @extends Polymer.Element */ class GrJsApiInterface extends Polymer.mixinBehaviors( [ Gerrit.PatchSetBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js index 6e5fd5b662..6e99e01cdd 100644 --- a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js +++ b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrLabelInfo extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-label/gr-label.js b/polygerrit-ui/app/elements/shared/gr-label/gr-label.js index 440e8e92e7..b5947570ae 100644 --- a/polygerrit-ui/app/elements/shared/gr-label/gr-label.js +++ b/polygerrit-ui/app/elements/shared/gr-label/gr-label.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.TooltipMixin + * @extends Polymer.Element */ class GrLabel extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js index c02c598bcc..cb5ad7c521 100644 --- a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js +++ b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrLabeledAutocomplete extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js index 4c221bc01e..defc6bdebd 100644 --- a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js +++ b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js @@ -20,6 +20,7 @@ const HLJS_PATH = 'bower_components/highlightjs/highlight.min.js'; const DARK_THEME_PATH = 'styles/themes/dark-theme.html'; + /** @extends Polymer.Element */ class GrLibLoader extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js index a57f331b57..ee032f6a2c 100644 --- a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js +++ b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js @@ -18,13 +18,13 @@ 'use strict'; /** - * @appliesMixin Gerrit.TooltipMixin - */ - /* * The gr-limited-text element is for displaying text with a maximum length * (in number of characters) to display. If the length of the text exceeds the * configured limit, then an ellipsis indicates that the text was truncated * and a tooltip containing the full text is enabled. + * + * @appliesMixin Gerrit.TooltipMixin + * @extends Polymer.Element */ class GrLimitedText extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js index bef9698cff..ccab685d2f 100644 --- a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js +++ b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrLinkedChip extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js index 5d2a1ca85a..bbe525e350 100644 --- a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js +++ b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrLinkedText extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js index dd825b37ee..8913cd882e 100644 --- a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js +++ b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js @@ -23,6 +23,7 @@ * @appliesMixin Gerrit.BaseUrlMixin * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrListView extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, @@ -48,6 +49,7 @@ }; } + /** @override */ detached() { super.detached(); this.cancelDebouncer('reload'); diff --git a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js index fc9dc994f6..8821bcbb34 100644 --- a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js +++ b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js @@ -23,6 +23,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrOverlay extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -52,6 +53,7 @@ }; } + /** @override */ created() { super.created(); this.addEventListener('iron-overlay-closed', diff --git a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js index 23389eee4c..ac876c4252 100644 --- a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js +++ b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrPageNav extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { @@ -28,11 +29,13 @@ }; } + /** @override */ attached() { super.attached(); this.listen(window, 'scroll', '_handleBodyScroll'); } + /** @override */ detached() { super.detached(); this.unlisten(window, 'scroll', '_handleBodyScroll'); diff --git a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js index ea39d0ecec..18e2596293 100644 --- a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js +++ b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js @@ -22,6 +22,7 @@ /** * @appliesMixin Gerrit.URLEncodingMixin + * @extends Polymer.Element */ class GrRepoBranchPicker extends Polymer.mixinBehaviors( [ Gerrit.URLEncodingBehavior, @@ -57,6 +58,7 @@ }; } + /** @override */ attached() { super.attached(); if (this.repo) { @@ -64,6 +66,7 @@ } } + /** @override */ ready() { super.ready(); this._branchDisabled = !this.repo; diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js index 0af1d9746e..1562e3eb63 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-auth.js @@ -76,7 +76,7 @@ } /** - * @param {string} status + * @param {Auth.STATUS} status */ _setStatus(status) { if (this._status === status) return; @@ -252,6 +252,7 @@ ACCESS_TOKEN: 'access_token', }; + /** @enum {number} */ Auth.STATUS = { UNDETERMINED: 0, AUTHED: 1, diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js index 0e2bef6ce7..472a7eaebf 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js @@ -44,6 +44,7 @@ * @appliesMixin Gerrit.PathListMixin * @appliesMixin Gerrit.PatchSetMixin * @appliesMixin Gerrit.RESTClientMixin + * @extends Polymer.Element */ class GrRestApiInterface extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -105,6 +106,7 @@ }; } + /** @override */ created() { super.created(); this._auth = Gerrit.Auth; diff --git a/polygerrit-ui/app/elements/shared/gr-select/gr-select.js b/polygerrit-ui/app/elements/shared/gr-select/gr-select.js index c9f13dec1f..ea838a03a8 100644 --- a/polygerrit-ui/app/elements/shared/gr-select/gr-select.js +++ b/polygerrit-ui/app/elements/shared/gr-select/gr-select.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.FireMixin + * @extends Polymer.Element */ class GrSelect extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -63,6 +64,7 @@ this.nativeSelect.focus(); } + /** @override */ created() { super.created(); this.addEventListener('change', @@ -71,6 +73,7 @@ () => this._updateValue()); } + /** @override */ ready() { super.ready(); // If not set via the property, set bind-value to the element value. diff --git a/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command.js b/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command.js index 945699150d..4b3108685c 100644 --- a/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command.js +++ b/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrShellCommand extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js index 7950e51acc..53311b5da5 100644 --- a/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js +++ b/polygerrit-ui/app/elements/shared/gr-storage/gr-storage.js @@ -28,6 +28,7 @@ 'editablecontent:', ]; + /** @extends Polymer.Element */ class GrStorage extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js index d3119b7375..a604bcf268 100644 --- a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js +++ b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js @@ -55,6 +55,7 @@ /** * @appliesMixin Gerrit.FireMixin * @appliesMixin Gerrit.KeyboardShortcutMixin + * @extends Polymer.Element */ class GrTextarea extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, @@ -125,6 +126,7 @@ }; } + /** @override */ ready() { super.ready(); if (this.monospace) { diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js index 22a5ecb0ff..90e6a0884f 100644 --- a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js +++ b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js @@ -19,6 +19,7 @@ /** * @appliesMixin Gerrit.TooltipMixin + * @extends Polymer.Element */ class GrTooltipContent extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip.js b/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip.js index 170a442e5d..6f458d18b8 100644 --- a/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip.js +++ b/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip.js @@ -17,6 +17,7 @@ (function() { 'use strict'; + /** @extends Polymer.Element */ class GrTooltip extends Polymer.GestureEventListeners( Polymer.LegacyElementMixin( Polymer.Element)) { diff --git a/polygerrit-ui/app/samples/bind-parameters.html b/polygerrit-ui/app/samples/bind-parameters.html index a28c462bc0..e6bf9d1e84 100644 --- a/polygerrit-ui/app/samples/bind-parameters.html +++ b/polygerrit-ui/app/samples/bind-parameters.html @@ -22,6 +22,7 @@ computed: '_computeExample(revision._number)', }, }, + /** @override */ attached() { this.plugin.attributeHelper(this).bind( 'revision', this._onRevisionChanged.bind(this)); diff --git a/polygerrit-ui/app/samples/repo-command.html b/polygerrit-ui/app/samples/repo-command.html index afbc78c9fb..5b3ee2c863 100644 --- a/polygerrit-ui/app/samples/repo-command.html +++ b/polygerrit-ui/app/samples/repo-command.html @@ -31,6 +31,7 @@ Polymer({ is: 'repo-command-low', + /** @override */ attached() { console.log(this.repoName); console.log(this.config); diff --git a/polygerrit-ui/app/samples/some-screen.html b/polygerrit-ui/app/samples/some-screen.html index da025a20fd..593b8abb21 100644 --- a/polygerrit-ui/app/samples/some-screen.html +++ b/polygerrit-ui/app/samples/some-screen.html @@ -42,6 +42,7 @@ properties: { rootUrl: String, }, + /** @override */ attached() { this.rootUrl = `${this.plugin.screenUrl()}`; },