From f494389074f8384c1881f8e3ba70fa0c08a2e5d5 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Tue, 16 Jul 2019 18:38:36 -0700 Subject: [PATCH] Add comment about why code is duplicated. --- lib/legacy/class.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/legacy/class.js b/lib/legacy/class.js index 3c537c9b80..87ac046c73 100644 --- a/lib/legacy/class.js +++ b/lib/legacy/class.js @@ -235,6 +235,9 @@ function GenerateClassFromInfo(info, Base, behaviors) { /** @private */ class PolymerGenerated extends Base { + // NOTE, this copies most of the code from DisableUpgradeMixin. This is + // unfortunate, but testing revealed a small penalty to applying the mixin + // on top of every generated class, so we do it directly here. static get observedAttributes() { return observedAttributesGetter.call(this).concat(DISABLED_ATTR); }