/** * wrap this Element with another Element using HTML string. * Note: this Element must be already in the DOM. * * @example * * let h2 = document.querySelector("h2"); * h2.wrappedWithHTML(`<a id="${anchorID}"></a>`); */Element.prototype.wrappedWithHTML=function(html){constelem=html.htmlToElement();this.before(elem); // insert element before selfelem.append(this); // move self into element ⭐ };