diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-04-03 11:22:51 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-04-03 16:55:11 -0300 |
commit | 9728073d89e6e734c193a2ce1e209d76cf17cc8c (patch) | |
tree | 8280681abc622d1405ecd5d71788693c2559fa67 /src | |
parent | 37322b13034712908abc1391dc7984b0b5095f14 (diff) |
html: Attributes.with
Diffstat (limited to 'src')
-rw-r--r-- | src/util/html.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/html.js b/src/util/html.js index b8dea516..7e6a6681 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -994,6 +994,12 @@ export class Attributes { } } + with(...args) { + const clone = this.clone(); + clone.add(...args); + return clone; + } + #addMultipleAttributes(attributes) { const flatInputAttributes = [attributes].flat(Infinity).filter(Boolean); |