docs: function getElAttributes(tag,attr) {
          var obj, knownBooleans, attrs, attrName, attrVal;
  
          obj = {};
  
          // known boolean attributes
          // we can check for matching boolean properties, but older browsers
          // won't know about HTML5 boolean attributes that we still read from
          knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ',';
  
          if (tag && tag.attributes && tag.attributes.length > 0) {
              attrs = tag.attributes;
  
              for (var i = attrs.length - 1; i >= 0; i--) {
                  attrName = attrs[i].name;
                  attrVal = attrs[i].value;
  
                  // check for known booleans
                  // the matching element property will return a value for typeof
                  if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) {
                      // the value of an included boolean attribute is typically an empty
                      // string ('') which would equal false if we just check for a false value.
                      // we also don't want support bad code like autoplay='false'
                      attrVal = (attrVal !== null) ? true : false;
                  }
  
                  if(attr && attrName == attr){
                      return attrVal;
                  }
  
                  obj[attrName] = attrVal;
              }
          }
          if(attr && typeof attr == 'string'){
              return tag[attr];
          }
          return obj;
      }