From 0f55d1dbe44906a47458dc065aa334577034a43a Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Fri, 5 Feb 2016 12:46:54 -0800 Subject: [PATCH] Configure attr's with property effects. More robust fix for #3288. --- src/lib/annotations/annotations.html | 6 ++++-- src/standard/configure.html | 13 ++++++++----- src/standard/effectBuilder.html | 1 + test/unit/attributes.html | 6 +----- test/unit/configure-elements.html | 21 +++++++++++++++++++-- test/unit/configure.html | 18 +++++++++++++++++- 6 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/lib/annotations/annotations.html b/src/lib/annotations/annotations.html index d3762755..ac19ed98 100644 --- a/src/lib/annotations/annotations.html +++ b/src/lib/annotations/annotations.html @@ -351,12 +351,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN // (properties) are case sensitive. Gambit is to map dash-case to // camel-case: `foo-bar` becomes `fooBar`. // Attribute bindings are excepted. + var propertyName = Polymer.CaseMap.dashToCamelCase(name); if (kind === 'property') { - name = Polymer.CaseMap.dashToCamelCase(name); + name = propertyName; } return { kind: kind, name: name, + propertyName: propertyName, parts: parts, literal: literal, isCompound: parts.length !== 1 @@ -372,7 +374,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN Polymer.Annotations.findAnnotatedNode(root, annote.parent); // unwind the stack, returning the indexed node at each level if (parent) { - // note: marginally faster than indexing via childNodes + // note: marginally faster than indexing via childNodes // (http://jsperf.com/childnodes-lookup) for (var n=parent.firstChild, i=0; n; n=n.nextSibling) { if (annote.index === i++) { diff --git a/src/standard/configure.html b/src/standard/configure.html index 8d4102a7..b337b25e 100644 --- a/src/standard/configure.html +++ b/src/standard/configure.html @@ -136,15 +136,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN for (var i=0, l=fx.length, x; (i