From 9728073d89e6e734c193a2ce1e209d76cf17cc8c Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 3 Apr 2024 11:22:51 -0300 Subject: html: Attributes.with --- src/util/html.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/html.js b/src/util/html.js index b8dea51..7e6a668 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); -- cgit 1.3.0-6-gf8a5