Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry
问题 Here is the full code:- class code extends HTMLElement{ constructor(){ super(); const shadow = this.attachShadow({ mode: 'open' }); const code = document.createElement('code'); code.textContent = super.textContent; shadow.appendChild(code); } } var Ω = (function() { 'use strict'; /** * Create the constructor * @param {String} selector The selector to use */ var Constructor = function(selector) { if (!selector) return; if (selector === 'document') { this.elems = [document]; } else if (selector