@qualweb/util
Version:
Utilities module for qualweb
13 lines (12 loc) • 460 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function textHasTheSameColorOfBackground(element) {
const color = element.getElementStyleProperty('color', '');
const background = element.getElementStyleProperty('background-color', '');
let text = element.getElementText();
if (text) {
text = text.trim();
}
return color === background && !!text;
}
exports.default = textHasTheSameColorOfBackground;