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

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -