Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
forEach(rules, function (rule) {
var style = rule.style, elements = document.querySelectorAll(rule.selectorText), attrs = {};
for (var name in Raphael._availableAttrs) {
var value = style[name];
if (!value) continue;
// fix for Chrome
attrs[name] = typeof Raphael._availableAttrs[name] === 'number' ? parseFloat(value) : value;
}
forEach(elements, function (element) {
paper.getById(element.raphaelid).attr(attrs);
});
});
});
forEach(rules, function (rule) {
var style = rule.style, elements = document.querySelectorAll(rule.selectorText), attrs = {};
for (var name in Raphael._availableAttrs) {
var value = style[name];
if (!value) continue;
// fix for Chrome
attrs[name] = typeof Raphael._availableAttrs[name] === 'number' ? parseFloat(value) : value;
}
forEach(elements, function (element) {
paper.getById(element.raphaelid).attr(attrs);
});
});
});