Skip to content

Commit

Permalink
fix(polyfill): now uses correct event names for validity events
Browse files Browse the repository at this point in the history
  • Loading branch information
calebdwilliams committed May 27, 2020
1 parent eb21036 commit a2fb8d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/element-internals.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class ElementInternals {
checkValidity() {
const validity = validityMap.get(this);
const ref = refMap.get(this);
const validityEvent = new Event(validity.valid, {
const eventName = validity.valid ? 'valid' : 'invalid';

This comment has been minimized.

Copy link
@enjoythelive1

enjoythelive1 May 27, 2020

Contributor

I was not able to find any reference to a valid event anywhere in the spec

This comment has been minimized.

Copy link
@calebdwilliams

calebdwilliams May 28, 2020

Author Owner

Yikes. My bad. Working on that. Good catch.

const validityEvent = new Event(eventName, {
bubbles: false,
cancelable: true,
composed: false
Expand Down

0 comments on commit a2fb8d6

Please sign in to comment.