From: Alexander Ebert Date: Fri, 23 Feb 2024 13:53:34 +0000 (+0100) Subject: Fix the usage of `document.createElement` X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2412d2a69797be85a6039a9fc3b38e7633d1d956;p=GitHub%2FWoltLab%2Fwoltlab.github.io.git Fix the usage of `document.createElement` See https://www.woltlab.com/community/thread/304959-fehler-in-der-javascript-doku/ --- diff --git a/docs/javascript/components_confirmation.md b/docs/javascript/components_confirmation.md index ea9efd56..e01819d6 100644 --- a/docs/javascript/components_confirmation.md +++ b/docs/javascript/components_confirmation.md @@ -124,7 +124,8 @@ Some dialogs require additional input elements, for example, the prompt to remov const { result, dialog } = await confirmationFactory() .custom(theQuestionToAsk) .withFormElements((dialog) => { - const p = document.createElement("

Hello World

"); + const p = document.createElement("p"); + p.textContent = "Hello World"; dialog.content.append(p); }); if (result) {