Cannot set property X of undefined - programatically created element
- by Dave
I am working on a class to create a fairly complex custom element. I want to be able to define element attributes (mainly CSS) as I am creating the elements. I came up with the below function to quickly set attrs for me given an input array:
// Sample array structure of apply_settings
//var _button_div = {
// syle : {
// position:…