diff --git a/examples/vanilla/file-upload/src/register.js b/examples/vanilla/file-upload/src/register.js index 271e6d40..6ebd002e 100644 --- a/examples/vanilla/file-upload/src/register.js +++ b/examples/vanilla/file-upload/src/register.js @@ -54,7 +54,7 @@ export class RegisterForm extends window.HTMLElement { } toggleConfirmation () { - const templateContent = this.confirmationTemplate$.content + const templateContent = this.confirmationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.signOutButton$ = document.querySelector(SELECTORS.signOutButton) this.signOutButton$.addEventListener('click', this.signOutHandler) @@ -65,7 +65,7 @@ export class RegisterForm extends window.HTMLElement { } toggleVerification () { - const templateContent = this.verificationTemplate$.content + const templateContent = this.verificationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.cancelRegistrationButton$ = document.querySelector(SELECTORS.cancelRegistrationButton) this.cancelRegistrationButton$.addEventListener('click', this.cancelRegistrationHandler) diff --git a/examples/vanilla/file-upload/src/upload.js b/examples/vanilla/file-upload/src/upload.js index de8e8241..7f34b8a2 100644 --- a/examples/vanilla/file-upload/src/upload.js +++ b/examples/vanilla/file-upload/src/upload.js @@ -22,7 +22,7 @@ export class UploadFileForm extends window.HTMLElement { } async connectedCallback () { - const templateContent = this.uploadFormTemplate$.content + const templateContent = this.uploadFormTemplate$.content.cloneNode(true) this.replaceChildren(templateContent) this.handleFileUpload = this.handleFileUpload.bind(this) this.form$ = document.querySelector(SELECTORS.uploadForm) @@ -58,22 +58,22 @@ export class UploadFileForm extends window.HTMLElement { } toggleEncoding () { - const templateContent = this.encodingTemplate$.content + const templateContent = this.encodingTemplate$.content.cloneNode(true) this.replaceChildren(this.formatEncodingTemplateContent(templateContent)) } toggleUploading () { - const templateContent = this.uploadingTemplate$.content + const templateContent = this.uploadingTemplate$.content.cloneNode(true) this.replaceChildren(this.formatUploadingTemplateContent(templateContent)) } toggleUploadComplete () { - const templateContent = this.uploadCompleteTemplate$.content + const templateContent = this.uploadCompleteTemplate$.content.cloneNode(true) this.replaceChildren(this.formatUploadCompleteTemplateContent(templateContent)) } toggleUploadError () { - const templateContent = this.uploadErrorTemplate$.content + const templateContent = this.uploadErrorTemplate$.content.cloneNode(true) this.replaceChildren(this.formatUploadErrorTemplateContent(templateContent)) } diff --git a/examples/vanilla/multi-file-upload/src/register.js b/examples/vanilla/multi-file-upload/src/register.js index 271e6d40..6ebd002e 100644 --- a/examples/vanilla/multi-file-upload/src/register.js +++ b/examples/vanilla/multi-file-upload/src/register.js @@ -54,7 +54,7 @@ export class RegisterForm extends window.HTMLElement { } toggleConfirmation () { - const templateContent = this.confirmationTemplate$.content + const templateContent = this.confirmationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.signOutButton$ = document.querySelector(SELECTORS.signOutButton) this.signOutButton$.addEventListener('click', this.signOutHandler) @@ -65,7 +65,7 @@ export class RegisterForm extends window.HTMLElement { } toggleVerification () { - const templateContent = this.verificationTemplate$.content + const templateContent = this.verificationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.cancelRegistrationButton$ = document.querySelector(SELECTORS.cancelRegistrationButton) this.cancelRegistrationButton$.addEventListener('click', this.cancelRegistrationHandler) diff --git a/examples/vanilla/multi-file-upload/src/upload.js b/examples/vanilla/multi-file-upload/src/upload.js index 45d5ebf6..921147ef 100644 --- a/examples/vanilla/multi-file-upload/src/upload.js +++ b/examples/vanilla/multi-file-upload/src/upload.js @@ -85,22 +85,22 @@ export class UploadFileForm extends window.HTMLElement { } toggleEncoding () { - const templateContent = this.encodingTemplate$.content + const templateContent = this.encodingTemplate$.content.cloneNode(true) this.replaceChildren(this.formatEncodingTemplateContent(templateContent)) } toggleUploading () { - const templateContent = this.uploadingTemplate$.content + const templateContent = this.uploadingTemplate$.content.cloneNode(true) this.replaceChildren(this.formatUploadingTemplateContent(templateContent)) } toggleUploadComplete () { - const templateContent = this.uploadCompleteTemplate$.content + const templateContent = this.uploadCompleteTemplate$.content.cloneNode(true) this.replaceChildren(this.formatUploadCompleteTemplateContent(templateContent)) } toggleUploadError () { - const templateContent = this.uploadErrorTemplate$.content + const templateContent = this.uploadErrorTemplate$.content.cloneNode(true) this.replaceChildren(this.formatUploadErrorTemplateContent(templateContent)) } @@ -133,7 +133,7 @@ export class UploadFileForm extends window.HTMLElement { } async connectedCallback () { - const templateContent = this.uploadFormTemplate$.content + const templateContent = this.uploadFormTemplate$.content.cloneNode(true) this.replaceChildren(templateContent) this.handleFileUpload = this.handleFileUpload.bind(this) this.form$ = document.querySelector(SELECTORS.uploadForm) diff --git a/examples/vanilla/sign-up-in/src/main.js b/examples/vanilla/sign-up-in/src/main.js index d9d5ecdb..e1945292 100644 --- a/examples/vanilla/sign-up-in/src/main.js +++ b/examples/vanilla/sign-up-in/src/main.js @@ -58,14 +58,14 @@ export class RegisterForm extends window.HTMLElement { } toggleConfirmation () { - const templateContent = this.confirmationTemplate$.content + const templateContent = this.confirmationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.signOutButton$ = document.querySelector(SELECTORS.signOutButton) this.signOutButton$.addEventListener('click', this.signOutHandler) } toggleVerification () { - const templateContent = this.verificationTemplate$.content + const templateContent = this.verificationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.cancelRegistrationButton$ = document.querySelector(SELECTORS.cancelRegistrationButton) this.cancelRegistrationButton$.addEventListener('click', this.cancelRegistrationHandler) diff --git a/examples/vanilla/uploads-list/src/register.js b/examples/vanilla/uploads-list/src/register.js index 93698c96..3d55419e 100644 --- a/examples/vanilla/uploads-list/src/register.js +++ b/examples/vanilla/uploads-list/src/register.js @@ -54,7 +54,7 @@ export class RegisterForm extends window.HTMLElement { } toggleConfirmation () { - const templateContent = this.confirmationTemplate$.content + const templateContent = this.confirmationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.signOutButton$ = document.querySelector(SELECTORS.signOutButton) this.signOutButton$.addEventListener('click', this.signOutHandler) @@ -65,7 +65,7 @@ export class RegisterForm extends window.HTMLElement { } toggleVerification () { - const templateContent = this.verificationTemplate$.content + const templateContent = this.verificationTemplate$.content.cloneNode(true) this.replaceChildren(this.formatTemplateContent(templateContent)) this.cancelRegistrationButton$ = document.querySelector(SELECTORS.cancelRegistrationButton) this.cancelRegistrationButton$.addEventListener('click', this.cancelRegistrationHandler)