diff --git a/lib/legacy/polymer.dom.js b/lib/legacy/polymer.dom.js index cf5c1ddc66..6d7f0eb667 100644 --- a/lib/legacy/polymer.dom.js +++ b/lib/legacy/polymer.dom.js @@ -395,6 +395,8 @@ if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noP } }); + // Note, `classList` is here only for legacy compatibility since it does not + // trigger distribution in v1 Shadow DOM. forwardReadOnlyProperties(Wrapper.prototype, [ 'classList' ]); @@ -420,12 +422,17 @@ if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noP } else { + // Methods that can provoke distribution or must return the logical, not + // composed tree. forwardMethods(DomApiNative.prototype, [ 'cloneNode', 'appendChild', 'insertBefore', 'removeChild', 'replaceChild', 'setAttribute', 'removeAttribute', 'querySelector', 'querySelectorAll' ]); + // Properties that should return the logical, not composed tree. Note, `classList` + // is here only for legacy compatibility since it does not trigger distribution + // in v1 Shadow DOM. forwardReadOnlyProperties(DomApiNative.prototype, [ 'parentNode', 'firstChild', 'lastChild', 'nextSibling', 'previousSibling', 'firstElementChild',