package.dist.utils.edit.getValue.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of user-event Show documentation
Show all versions of user-event Show documentation
Fire events the same way the user does
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;
}