Skip to content

Commit

Permalink
[Tests] no-noninteractive-element-interactions: add passing tests f…
Browse files Browse the repository at this point in the history
…or form with onSubmit

Closes #323.
  • Loading branch information
V2dha authored and ljharb committed Jul 8, 2022
1 parent 0c19f02 commit ffefbad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions __tests__/src/rules/no-noninteractive-element-interactions-test.js
Expand Up @@ -110,6 +110,16 @@ const alwaysValid = [
{ code: '<embed onClick={() => {}} />;' },
{ code: '<font onClick={() => {}} />;' },
{ code: '<font onSubmit={() => {}} />;' },
{ code: '<form onSubmit={() => {}} />;' },
{
code: `
<form onSubmit={this.handleSubmit.bind(this)} method="POST">
<button type="submit">
Save
</button>
</form>
`,
},
{ code: '<frameset onClick={() => {}} />;' },
{ code: '<head onClick={() => {}} />;' },
{ code: '<header onClick={() => {}} />;' },
Expand Down

0 comments on commit ffefbad

Please sign in to comment.