« get me outta code hell

html: Attributes.clone - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-12-31 22:25:07 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-01-01 15:19:33 -0400
commitefe22f73ff21257410d8c13ad9c6db9b54540c09 (patch)
tree4cb53461b8273a03b817e0e5ed2d0fa4fe785992 /src/util
parent71c82c1f9ed8b367c2eddd2b24ceb1b84d52b735 (diff)
html: Attributes.clone
Diffstat (limited to 'src/util')
-rw-r--r--src/util/html.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/html.js b/src/util/html.js
index dea346c..5144a31 100644
--- a/src/util/html.js
+++ b/src/util/html.js
@@ -600,6 +600,10 @@ export class Attributes {
     this.attributes = attributes;
   }
 
+  clone() {
+    return new Attributes(this);
+  }
+
   set attributes(value) {
     this.#attributes = Object.create(null);