mirror of
https://github.com/dtinth/comic-mono-font.git
synced 2026-02-21 22:43:59 +00:00
Set textContent instead of using setHTML
This way it works on Safari and Firefox without additional work, and it may be better for security
This commit is contained in:
4
index.js
4
index.js
@@ -103,10 +103,10 @@ seriousLightItalicButton.addEventListener("click", function () {
|
||||
|
||||
newExampleTextInput.addEventListener("keydown", (event) => {
|
||||
if (event.code === "Enter") {
|
||||
exampleText.setHTML(newExampleTextInput.value);
|
||||
exampleText.textContent = newExampleTextInput.value;
|
||||
}
|
||||
});
|
||||
|
||||
newExampleTextButton.addEventListener("click", () => {
|
||||
exampleText.setHTML(newExampleTextInput.value);
|
||||
exampleText.textContent = newExampleTextInput.value;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user