Skip to content

Commit b64e67f

Browse files
committed
feat: Use innerHTML instead of text
1 parent d921026 commit b64e67f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

simpletoast.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
console.log(`SimpleToast(v${localToast.versionString}): Publicized`);
1515
}
1616
})(this, () => {
17-
const version = buildVersion(1, 11, 0);
17+
const version = buildVersion(1, 12, 0);
1818
const style = {
1919
root: {
2020
display: 'flex',
@@ -156,20 +156,20 @@
156156
if (title) {
157157
applyCSS(tel, style.title);
158158
applyCSS(tel, css.title);
159-
tel.textContent = title;
159+
tel.innerHTML = title;
160160
}
161-
body.textContent = text;
161+
body.innerHTML = text;
162162
if (footer) {
163163
applyCSS(fel, style.footer);
164164
applyCSS(fel, css.footer);
165-
fel.textContent = footer;
165+
fel.innerHTML = footer;
166166
}
167167

168168
let closeType = 'unknown';
169169
const toast = {
170170
setText: (newText) => {
171171
if (!newText || !toast.exists()) return;
172-
body.textContent = newText;
172+
body.innerHTML = newText;
173173
},
174174
exists: () => toasts.has(id),
175175
close: () => {

0 commit comments

Comments
 (0)