Skip to content

Commit

Permalink
add support for datasets in $.set
Browse files Browse the repository at this point in the history
  • Loading branch information
UweOhse committed Apr 18, 2024
1 parent bfe9f28 commit df7ea9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dom/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ function set (subject, property, value) {
if (property in setProps) {
setProps[property](subject, value);
}
else if (property === "dataset") {
for (const key of Object.keys(value)) {
subject.dataset[key]=value[key]
}
}
else if (property in subject) {
subject[property] = value;
}
Expand Down

0 comments on commit df7ea9e

Please sign in to comment.