Skip to content

Commit 3b4b391

Browse files
Update web_src/js/utils/dom.ts
Co-authored-by: silverwind <[email protected]>
1 parent b674b97 commit 3b4b391

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/utils/dom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ export function replaceTextareaSelection(textarea: HTMLTextAreaElement, text: st
301301
}
302302

303303
// Warning: Do not enter any unsanitized variables here
304-
export function createElementFromHTML(htmlString: string): HTMLElement {
304+
export function createElementFromHTML<T = HTMLElement>(htmlString: string): T {
305305
htmlString = htmlString.trim();
306306
// some tags like "tr" are special, it must use a correct parent container to create
307307
if (htmlString.startsWith('<tr')) {

0 commit comments

Comments
 (0)