Skip to content

Commit fd8e755

Browse files
committed
[Fix] no-unknown-property: Mark onLoad/onError as supported on iframes
1 parent 7ba7ec4 commit fd8e755

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/rules/no-unknown-property.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ const ATTRIBUTE_TAGS_MAP = {
6868
onEmptied: ['audio', 'video'],
6969
onEncrypted: ['audio', 'video'],
7070
onEnded: ['audio', 'video'],
71-
onError: ['audio', 'video', 'img', 'link', 'source', 'script'],
72-
onLoad: ['script', 'img', 'link'],
71+
onError: ['audio', 'video', 'img', 'link', 'source', 'script', 'iframe'],
72+
onLoad: ['script', 'img', 'link', 'iframe'],
7373
onLoadedData: ['audio', 'video'],
7474
onLoadedMetadata: ['audio', 'video'],
7575
onLoadStart: ['audio', 'video'],

tests/lib/rules/no-unknown-property.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ ruleTester.run('no-unknown-property', rule, {
400400
data: {
401401
name: 'onError',
402402
tagName: 'div',
403-
allowedTags: 'audio, video, img, link, source, script',
403+
allowedTags: 'audio, video, img, link, source, script, iframe',
404404
},
405405
},
406406
],
@@ -413,7 +413,7 @@ ruleTester.run('no-unknown-property', rule, {
413413
data: {
414414
name: 'onLoad',
415415
tagName: 'div',
416-
allowedTags: 'script, img, link',
416+
allowedTags: 'script, img, link, iframe',
417417
},
418418
},
419419
],

0 commit comments

Comments
 (0)