From 8af9237c20e5f45442927d6bf7b4a34755f11a8f Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 17 Jun 2021 12:00:18 +0200
Subject: [PATCH] Add a docstring to defineCustomElement()

---
 packages/common/utils.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/packages/common/utils.js b/packages/common/utils.js
index 5fb9d93b..96362877 100644
--- a/packages/common/utils.js
+++ b/packages/common/utils.js
@@ -80,7 +80,15 @@ export const base64EncodeUnicode = (str) => {
  */
 
 /**
- * 
+ * Same as customElements.define() but with some additional error handling.
+ *
+ * In case the same component (with the exact same implementation) is already
+ * defined then this will do nothing instead of erroring out.
+ *
+ * In case the browser doesn't support custom elements it will fill all those
+ * custom tags with an error message so the user gets some feedback instead of
+ * just an empty page.
+ *
  * @param {string} name 
  * @param {Function} constructor 
  * @param {object} options 
-- 
GitLab