File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,14 +42,6 @@ class Pattern extends BasePattern {
4242 // validation fails (e.g. pat-inject).
4343 static order = 100 ;
4444
45- _dompurify = null ;
46- async get_dompurify ( ) {
47- if ( ! this . _dompurify ) {
48- this . _dompurify = ( await import ( "dompurify" ) ) . default ;
49- }
50- return this . _dompurify ;
51- }
52-
5345 init ( ) {
5446 events . add_event_listener (
5547 this . el ,
@@ -406,7 +398,7 @@ class Pattern extends BasePattern {
406398 // executed. Chrome includes the input value in it's browser validation
407399 // message. When placing that into the DOM, malicious input could get
408400 // executed within the web page context.
409- const dompurify = await this . get_dompurify ( ) ;
401+ const dompurify = ( await import ( "dompurify" ) ) . default ;
410402 const validation_message = dompurify . sanitize (
411403 input . validationMessage || input [ KEY_ERROR_MSG ]
412404 ) ;
You can’t perform that action at this time.
0 commit comments