code: function addToDataset(element, key, value, forceCompat) {
    // Use dataset property or a fallback if unsupported.
    if (forceCompat || !element.dataset) {
      element.setAttribute('data-' + key, value);
    }
    else {
      element.dataset[key] = value;
    }
  
    return;
  }
docs: /*jshint unused:false