Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parent.content.forEach(elem => {
if (is(proxy(elem), rule.selector)) {
const style = elem.hasAttr('style') ? elem.attr('style').value.split(';') : []
for (let key in rule.declarations) {
style.push(`${key}: ${rule.declarations[key]};`)
}
elem.addAttr({
name: 'style',
local: 'style',
value: style.join(' '),
prefix: ''
})
}
if (!elem.isEmpty()) {
walk(elem, rule)
}
})
}
function selectorMatches(selector, selectProps) {
const thing = {
type: "tag",
name: selectProps.element,
attribs: {
id: selectProps.id,
class: selectProps.class,
},
};
return CSSselect.is(thing, selector);
}
JSAPI.prototype.matches = function(selector) {
return cssSelect.is(this, selector, cssSelectOpts);
};
export function isMatched(elem, query) {
return CSSselect.is(elem, resolveQuery(query), {adapter});
}
JSAPI.prototype.matches = function(selector) {
return cssSelect.is(this, selector, cssSelectOpts);
};
matches: function (selectors) {
return cssSelect.is(this, selectors);
},
function isMatched(elem, query) {
return CSSselect.is(elem, resolveQuery(query), {
adapter: adapter
});
}