'use strict';

function safeCustomElement(tagName) {
  return (classOrDescriptor) => {
    if (typeof customElements !== "undefined" && !customElements.get(tagName)) {
      customElements.define(tagName, classOrDescriptor);
    }
    return classOrDescriptor;
  };
}

exports.safeCustomElement = safeCustomElement;
