Skip to content

Commit

Permalink
[Fix] no-unknown-property: Mark onLoad/onError as supported on iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Sep 5, 2022
1 parent 7ba7ec4 commit fd8e755
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/rules/no-unknown-property.js
Expand Up @@ -68,8 +68,8 @@ const ATTRIBUTE_TAGS_MAP = {
onEmptied: ['audio', 'video'],
onEncrypted: ['audio', 'video'],
onEnded: ['audio', 'video'],
onError: ['audio', 'video', 'img', 'link', 'source', 'script'],
onLoad: ['script', 'img', 'link'],
onError: ['audio', 'video', 'img', 'link', 'source', 'script', 'iframe'],
onLoad: ['script', 'img', 'link', 'iframe'],
onLoadedData: ['audio', 'video'],
onLoadedMetadata: ['audio', 'video'],
onLoadStart: ['audio', 'video'],
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/rules/no-unknown-property.js
Expand Up @@ -400,7 +400,7 @@ ruleTester.run('no-unknown-property', rule, {
data: {
name: 'onError',
tagName: 'div',
allowedTags: 'audio, video, img, link, source, script',
allowedTags: 'audio, video, img, link, source, script, iframe',
},
},
],
Expand All @@ -413,7 +413,7 @@ ruleTester.run('no-unknown-property', rule, {
data: {
name: 'onLoad',
tagName: 'div',
allowedTags: 'script, img, link',
allowedTags: 'script, img, link, iframe',
},
},
],
Expand Down

0 comments on commit fd8e755

Please sign in to comment.