Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return attributes.some((attribute) => {
return domutils.hasAttrib(node, attribute)
})
}
function isProperty (element) {
return DOM.hasAttrib(element, 'itemprop');
}
var baseElem = DOM.findOne(function (elem) {
return elem.name === 'base' && DOM.hasAttrib(elem, 'href');
}, dom);
if (baseElem) {
function getItemValue (element) {
if (!isProperty(element)) return null;
if (isItem(element)) return element;
if (DOM.hasAttrib(element, 'content')) {
return resolveProperty(DOM.getAttributeValue(element, 'content'));
}
if (isName(element, srcProperty)) {
return resolveUrlProperty(DOM.getAttributeValue(element, 'src'));
}
if (isName(element, hrefProperty)) {
return resolveUrlProperty(DOM.getAttributeValue(element, 'href'));
}
if (isName(element, [ 'object' ])) {
return resolveUrlProperty(DOM.getAttributeValue(element, 'data'));
}
if (isName(element, [ 'data', 'meter' ])) {
return resolveNumberProperty(DOM.getAttributeValue(element, 'value'));
}
if (isName(element, [ 'time' ])) {
return resolveDateProperty(DOM.getAttributeValue(element, 'datetime'));
function isItem (element) {
return DOM.hasAttrib(element, 'itemscope');
}