Skip to content

Commit

Permalink
Allow load/error events on non-interactive elements
Browse files Browse the repository at this point in the history
  • Loading branch information
joankaradimov committed Jul 30, 2019
1 parent b6f31f5 commit d6932e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rules/lint-no-invalid-interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ module.exports = class InvalidInteractive extends Rule {
return;
}

// Allow onerror={{action "foo"}} on img tags
if (this._element.tag === 'img' && node.name === 'onerror') {
// Allow onerror={{action "foo"}} and onload={{action "foo"}} on any tag
if (this._element.tag === 'img' && ['onerror', 'onload'].includes(node.name)) {
return;
}

Expand Down

0 comments on commit d6932e7

Please sign in to comment.