const template = document.createElement('template'); template.innerHTML = `
` class AuthLoader extends HTMLElement { constructor() { super(); this._shadowRoot = this.attachShadow({ 'mode': 'open' }); this._shadowRoot.appendChild(template.content.cloneNode(true)); this.show(); } static get observedAttributes() { return ['payment']; } // define getters and setters for attributes get payment() { return this.getAttribute('payment'); } set payment(val) { if (val) { this.setAttribute('payment', val); } else { this.removeAttribute('payment'); } } show(){ // $('.overlayanwiAuth').css('display','block'); this._shadowRoot.querySelector('.overlayanwiAuth').style.display = "block"; } hide(){ //$('.overlayanwiAuth').addClass('display','none'); this._shadowRoot.querySelector('.overlayanwiAuth').style.display = "none"; } } window.customElements.define('auth-loader', AuthLoader);