Polymer camelCase attributes -


i'm writing wrapper around js library polymer components. basically, need able assign attributes component, , forward them instance of js object.

the problem polymer (or webcomponents in general?) forces attribute names lowercase.

declaring element

<some-element foobar="baz"></some-element>

generic change listener

attributechanged: function(attrname, oldval, newval){     // attrname -> foobar, not member of someinstance     this.someinstance[attrname] = newval; } 

is there way camel-cased name? maybe can create hash publish object on prototype... how reference that?

aha! publish available on component instance! allows me grab names , make map lowercase camelcase.

var map = {}; object.keys(this.publish).foreach(function(key){     map[key.tolowercase()] = key; }); 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

amazon web services - Installing MobileFirst 7.0 server on AWS -

Non Unique Username with ASP.Net Identity 2.0 -