const EVENT_TYPE = 'dashboard.dom.updateAttr';
export default {
    type: EVENT_TYPE,
    getJs: () => `
      case '${EVENT_TYPE}':
        var $comp = $(data.selector);

        if ($comp) {
          if (data.attrs && data.attrs instanceof Array) {
            data.attrs.forEach(function(attr) {
              Object.keys(attr).forEach(function(key) {
                $comp.attr(key, attr[key]);
              });
            });
          }
        }
        break;\n
    `
};