diff --git a/lib/legacy/polymer.dom.js b/lib/legacy/polymer.dom.js index 6d7f0eb667..478bbc9665 100644 --- a/lib/legacy/polymer.dom.js +++ b/lib/legacy/polymer.dom.js @@ -48,6 +48,9 @@ class DomApiNative { * @param {Node} node Node for which to create a Polymer.dom helper object. */ constructor(node) { + if (window['ShadyDOM'] && window['ShadyDOM']['inUse']) { + window['ShadyDOM']['patch'](node); + } this.node = node; } @@ -441,7 +444,7 @@ if (window['ShadyDOM'] && window['ShadyDOM']['inUse'] && window['ShadyDOM']['noP ]); forwardProperties(DomApiNative.prototype, [ - 'textContent', 'innerHTML' + 'textContent', 'innerHTML', 'className' ]); } diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index c92bea3fa6..bff06951fd 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -727,6 +727,12 @@ function setupCompoundStorage(node, binding) { storage[target] = literals; // Configure properties with their literal parts if (binding.literal && binding.kind == 'property') { + // Note, className needs style scoping so this needs wrapping. + // We may also want to consider doing this for `textContent` and + // `innerHTML`. + if (target === 'className') { + node = wrap(node); + } node[target] = binding.literal; } } @@ -1407,6 +1413,10 @@ export const PropertyEffects = dedupingMixin(superClass => { // implement a whitelist of tag & property values that should never // be reset (e.g. .value &&