Skip to content

Commit daaf0cb

Browse files
committed
docs: add warning about xss
1 parent 8994eb1 commit daaf0cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/DocumentComponent.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ export class DocumentComponent extends NodeComponent<DocumentFragment> {
2727
/**
2828
* Template literal tag function that accepts HTML code with components in a
2929
* string literal
30+
*
31+
* @warning This method should only be used with trusted inputs
32+
* to avoid XSS vulnerabilities.
3033
*/
3134
public static tag(strings: TemplateStringsArray, ...components: (any | NodeComponent<any>)[]): DocumentComponent {
3235
const idPrefix = `tag-${crypto.randomUUID()}-`;

0 commit comments

Comments
 (0)