Skip to content

Commit a2fb8d6

Browse files
fix(polyfill): now uses correct event names for validity events
1 parent eb21036 commit a2fb8d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/element-internals.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class ElementInternals {
3333
checkValidity() {
3434
const validity = validityMap.get(this);
3535
const ref = refMap.get(this);
36-
const validityEvent = new Event(validity.valid, {
36+
const eventName = validity.valid ? 'valid' : 'invalid';
37+
const validityEvent = new Event(eventName, {
3738
bubbles: false,
3839
cancelable: true,
3940
composed: false

0 commit comments

Comments
 (0)