refactor: use function ref for simple observers
Update simple observers and computed properties to use function
references per JS-Polymer style guide.
Bug: b:263421791
Test: browser_test --gtest_filter=*Shimless*
Change-Id: Ifa7ee12da5451c0f44be633e9f51976894c9dc3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4117697
Commit-Queue: Ashley Prasad <ashleydp@google.com>
Reviewed-by: Gavin Williams <gavinwill@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1086504}
diff --git a/ash/webui/shimless_rma/resources/calibration_component_chip.js b/ash/webui/shimless_rma/resources/calibration_component_chip.js
index 363b44c6b..4f3b1ce 100644
--- a/ash/webui/shimless_rma/resources/calibration_component_chip.js
+++ b/ash/webui/shimless_rma/resources/calibration_component_chip.js
@@ -56,7 +56,8 @@
isFirstClickableComponent: {
type: Boolean,
value: false,
- observer: 'onIsFirstClickableComponentChanged_',
+ observer: CalibrationComponentChipElement.prototype
+ .onIsFirstClickableComponentChanged_,
},
/** @type {number} */
diff --git a/ash/webui/shimless_rma/resources/onboarding_enter_rsu_wp_disable_code_page.js b/ash/webui/shimless_rma/resources/onboarding_enter_rsu_wp_disable_code_page.js
index a6b2c5d..5d15113 100644
--- a/ash/webui/shimless_rma/resources/onboarding_enter_rsu_wp_disable_code_page.js
+++ b/ash/webui/shimless_rma/resources/onboarding_enter_rsu_wp_disable_code_page.js
@@ -57,7 +57,8 @@
*/
errorCode: {
type: Object,
- observer: 'onErrorCodeChanged_',
+ observer:
+ OnboardingEnterRsuWpDisableCodePage.prototype.onErrorCodeChanged_,
},
/** @protected */
@@ -82,7 +83,8 @@
rsuCode_: {
type: String,
value: '',
- observer: 'onRsuCodeChanged_',
+ observer:
+ OnboardingEnterRsuWpDisableCodePage.prototype.onRsuCodeChanged_,
},
/** @protected */
diff --git a/ash/webui/shimless_rma/resources/onboarding_network_page.js b/ash/webui/shimless_rma/resources/onboarding_network_page.js
index 57c0711f..c94e0c0 100644
--- a/ash/webui/shimless_rma/resources/onboarding_network_page.js
+++ b/ash/webui/shimless_rma/resources/onboarding_network_page.js
@@ -132,7 +132,7 @@
isOnline_: {
type: Boolean,
value: false,
- observer: 'onIsOnlineChange_',
+ observer: OnboardingNetworkPage.prototype.onIsOnlineChange_,
},
};
}
diff --git a/ash/webui/shimless_rma/resources/onboarding_update_page.js b/ash/webui/shimless_rma/resources/onboarding_update_page.js
index 28f845e..740fb97 100644
--- a/ash/webui/shimless_rma/resources/onboarding_update_page.js
+++ b/ash/webui/shimless_rma/resources/onboarding_update_page.js
@@ -82,7 +82,8 @@
updateInProgress_: {
type: Boolean,
value: false,
- observer: 'onUpdateInProgressChange_',
+ observer:
+ OnboardingUpdatePageElement.prototype.onUpdateInProgressChange_,
},
/** @protected */
diff --git a/ash/webui/shimless_rma/resources/repair_component_chip.js b/ash/webui/shimless_rma/resources/repair_component_chip.js
index 7894cf7..3b900da 100644
--- a/ash/webui/shimless_rma/resources/repair_component_chip.js
+++ b/ash/webui/shimless_rma/resources/repair_component_chip.js
@@ -71,7 +71,8 @@
isFirstClickableComponent: {
type: Boolean,
value: false,
- observer: 'onIsFirstClickableComponentChanged_',
+ observer:
+ RepairComponentChip.prototype.onIsFirstClickableComponentChanged_,
},
};