code: function setAttrs(element, attrs) {
          for (var k in attrs) {
              if (attrs.hasOwnProperty(k)) {
                  element.setAttribute(k, attrs[k]); //doesn't set async property
                  element[k] = attrs[k];
              }
          }
      }
docs: DOM