diff --git a/lib/legacy/class.html b/lib/legacy/class.html index 4269b002..bed2211d 100644 --- a/lib/legacy/class.html +++ b/lib/legacy/class.html @@ -14,7 +14,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN 'use strict'; - const metaProps = { + const lifecycleProps = { attached: true, detached: true, ready: true, @@ -22,18 +22,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN beforeRegister: true, registered: true, attributeChanged: true, - }; - - const excludeProps = Object.assign({ - behaviors: true - }, metaProps); - - const lifecycleProps = Object.assign({ listeners: true, hostAttributes: true - }, metaProps); + }; - function copyProperties(source, target) { + const excludeOnInfo = { + attached: true, + detached: true, + ready: true, + created: true, + beforeRegister: true, + registered: true, + attributeChanged: true, + behaviors: true + }; + + const excludeOnBehaviors = Object.assign({ + listeners: true, + hostAttributes: true, + properties: true, + observers: true, + }, excludeOnInfo); + + function copyProperties(source, target, excludeProps) { for (let p in source) { // NOTE: cannot copy `excludeProps` methods onto prototype at least because // `super.ready` must be called and is not included in the user fn. @@ -97,12 +108,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN // (again same as 1.x) function applyBehaviors(proto, behaviors, lifecycle) { for (let i=0; i @@ -434,6 +441,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + +