File tree Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,6 @@ async function check(autoCheckElement: AutoCheckElement) {
151
151
if ( autoCheckElement . required ) {
152
152
input . setCustomValidity ( '' )
153
153
}
154
- input . dispatchEvent ( new CustomEvent ( 'auto-check-complete' , { bubbles : true } ) )
155
154
return
156
155
}
157
156
@@ -160,17 +159,13 @@ async function check(autoCheckElement: AutoCheckElement) {
160
159
body . append ( 'value' , input . value )
161
160
162
161
const id = body . entries ? [ ...body . entries ( ) ] . sort ( ) . toString ( ) : null
163
- if ( id && id === state . previousValue ) {
164
- input . dispatchEvent ( new CustomEvent ( 'auto-check-complete' , { bubbles : true } ) )
165
- return
166
- }
162
+ if ( id && id === state . previousValue ) return
167
163
state . previousValue = id
168
164
169
165
if ( ! input . value . trim ( ) ) {
170
166
if ( autoCheckElement . required ) {
171
167
input . setCustomValidity ( '' )
172
168
}
173
- input . dispatchEvent ( new CustomEvent ( 'auto-check-complete' , { bubbles : true } ) )
174
169
return
175
170
}
176
171
Original file line number Diff line number Diff line change @@ -51,24 +51,6 @@ describe('auto-check element', function() {
51
51
assert . isFalse ( input . checkValidity ( ) )
52
52
} )
53
53
54
- it ( 'validates the input element if there is no `src` attribute' , async function ( ) {
55
- checker . removeAttribute ( 'src' )
56
- const completeEvent = once ( checker , 'auto-check-complete' )
57
- triggerChange ( input , 'hub' )
58
- await completeEvent
59
- assert . isTrue ( input . checkValidity ( ) )
60
- checker . src = '/success'
61
- } )
62
-
63
- it ( 'validates the input element if there is no `csrf` attribute' , async function ( ) {
64
- checker . removeAttribute ( 'csrf' )
65
- const completeEvent = once ( checker , 'auto-check-complete' )
66
- triggerChange ( input , 'hub' )
67
- await completeEvent
68
- assert . isTrue ( input . checkValidity ( ) )
69
- checker . csrf = 'foo'
70
- } )
71
-
72
54
it ( 'invalidates input request is in-flight' , async function ( ) {
73
55
triggerChange ( input , 'hub' )
74
56
await once ( checker , 'loadstart' )
You can’t perform that action at this time.
0 commit comments