Skip to content

Commit 5876a62

Browse files
authored
docs: add warning about xss (#70)
2 parents 406c058 + 3e95f00 commit 5876a62

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)