Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return dom => {
applyParams(params)(selectOne("svg", dom));
};
}
public querySelector(selector) {
const found = css.selectOne(selector, this._dom)
if (!found) {
return null
}
return new Element(this._withParent(found))
}
export function querySelector(query, elems) {
return CSSselect.selectOne(resolveQuery(query), elems, {adapter});
}
querySelector: function (selector) {
return cssSelect.selectOne(selector, this) || null;
},
return dom => {
const svg = selectOne("svg", dom);
Object.keys(selectors).forEach(selector => {
selectAll(selector, svg).forEach(applyParams(selectors[selector]));
});
};
}
export default function applyData(source, data) {
const dom = parse(source, { xmlMode: true });
const svg = dom ? selectOne('svg', dom) : null;
if (!svg) {
throw Error('Invalid loaded xml format');
}
data = data || {};
const root = data.root || {};
const selectors = data.selectors || {};
assign(svg.attribs, root);
Object.keys(selectors).forEach(selector => {
const attribs = selectors[selector];
const elements = selectAll(selector, svg);
elements.forEach(element => {
function querySelector(query, elems) {
return CSSselect.selectOne(resolveQuery(query), elems, {
adapter: adapter
});
}
JSAPI.prototype.querySelector = function(selectors) {
return cssSelect.selectOne(selectors, this, cssSelectOpts);
};
JSAPI.prototype.querySelector = function(selectors) {
return cssSelect.selectOne(selectors, this, cssSelectOpts);
};