Code cleanup con CodeMaid

This commit is contained in:
Samuele E. Locatelli
2020-09-11 12:45:52 +02:00
parent 831ad26bb0
commit 91ccb018af
293 changed files with 52598 additions and 50875 deletions
+9 -9
View File
@@ -7,12 +7,12 @@
* Object with a list of properties and values which will be applied to the element
*/
export default function setAttributes(element, attributes) {
Object.keys(attributes).forEach(function(prop) {
const value = attributes[prop];
if (value !== false) {
element.setAttribute(prop, attributes[prop]);
} else {
element.removeAttribute(prop);
}
});
}
Object.keys(attributes).forEach(function (prop) {
const value = attributes[prop];
if (value !== false) {
element.setAttribute(prop, attributes[prop]);
} else {
element.removeAttribute(prop);
}
});
}