All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.utils.edit.getValue.js Maven / Gradle / Ivy

The newest version!
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getValue = getValue;

var _isContentEditable = require("./isContentEditable");

function getValue(element) {
  // istanbul ignore if
  if (!element) {
    return null;
  }

  if ((0, _isContentEditable.isContentEditable)(element)) {
    return element.textContent;
  }

  return element.value;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy