diff --git a/lib/legacy/class.js b/lib/legacy/class.js index 9bfd066bf1..c6d70e536f 100644 --- a/lib/legacy/class.js +++ b/lib/legacy/class.js @@ -241,7 +241,8 @@ function GenerateClassFromInfo(info, Base, behaviors) { // Prevent element from initializing properties when it's upgrade disabled. /** @override */ _initializeProperties() { - if (!this.hasAttribute(DISABLED_ATTR)) { + // Enable disable-upgrade use when `legacyOptimizations` setting is on. + if (legacyOptimizations && !this.hasAttribute(DISABLED_ATTR)) { super._initializeProperties(); } else { this.__isUpgradeDisabled = true; diff --git a/test/unit/disable-upgrade.html b/test/unit/disable-upgrade.html index bf430f648f..47bca562ad 100644 --- a/test/unit/disable-upgrade.html +++ b/test/unit/disable-upgrade.html @@ -77,6 +77,10 @@