diff --git a/packages/common/utils.js b/packages/common/utils.js index 5fb9d93b2b0870ee6f9c238218621a5edd4d5bc1..963628775ceb9c9bd688078a1f29bfaf4b6473bb 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