Skip to content

Commit

Permalink
Do not hyphenize properties
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Oct 31, 2016
1 parent 0472ecd commit 5f2258d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/com/vaadin/polymer/Polymer.java
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public native static <T> T property(Object jso, String name)
public native static void property(HTMLElement jso, String name, String value)
/*-{
if (jso.setAttribute && /^[\[\{]/.test(value)) {
jso.setAttribute(name, value);
jso.setAttribute(name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(), value);
} else {
jso[name] = value;
}
Expand Down Expand Up @@ -633,5 +633,3 @@ public static DomApi dom(Object element) {
return Polymer.dom(element);
}
}


2 changes: 1 addition & 1 deletion template/Widget.template
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class <%= className() %> extends <%= base ? base : 'PolymerWidget' %> {
* <%= item.isBehavior ? ('@behavior ' + item.behavior ) : ''%>
*/
public void <%= computeSetterWithPrefix(item) %>(String value) {
Polymer.property(this.getPolymerElement(), "<%= hyphenize(item.name) %>", value);
Polymer.property(this.getPolymerElement(), "<%= item.name %>", value);
}
<% }); %>
<% _.forEach(getMethods(properties), function(item) { var retType = returnString(item); %>
Expand Down

0 comments on commit 5f2258d

Please sign in to comment.