dist/cropper.common.js
function getData(element, name) {
  if (isObject(element[name])) {
    return element[name];
  } else if (element.dataset) {
    return element.dataset[name];
  }

  return element.getAttribute('data-' + hyphenate(name));
}
function getData(element, name) {
  if (isObject(element[name])) {
    return element[name];
  } else if (element.dataset) {
    return element.dataset[name];
  }

  return element.getAttribute('data-' + hyphenate(name));
}
function getData ( element , name ) { if ( isObject ( element [ name ] ) ) { return element [ name ] ; } else if ( element . dataset ) { return element . dataset [ name ] ; } return element . getAttribute ( 'data-' + hyphenate ( name ) ) ; }
Get data from the given element.
@param {Element} element - The target element.
@param {string} name - The data key to get.
@returns {string} The data value.
Get data from the given element .