Skip to content

Commit 1093a96

Browse files
authored
no-unknown-property: allow allowFullScreen on iframe
1 parent 17858be commit 1093a96

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/rules/no-unknown-property.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ const ATTRIBUTE_TAGS_MAP = {
104104
loop: ['audio', 'video'],
105105
muted: ['audio', 'video'],
106106
playsInline: ['video'],
107-
allowFullScreen: ['video'],
108-
webkitAllowFullScreen: ['video'],
109-
mozAllowFullScreen: ['video'],
107+
allowFullScreen: ['iframe', 'video'],
108+
webkitAllowFullScreen: ['iframe', 'video'],
109+
mozAllowFullScreen: ['iframe', 'video'],
110110
poster: ['video'],
111111
preload: ['audio', 'video'],
112112
scrolling: ['iframe'],

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ ruleTester.run('no-unknown-property', rule, {
7070
{ code: '<link rel="preload" as="image" href="someHref" imageSrcSet="someImageSrcSet" imageSizes="someImageSizes" />' },
7171
{ code: '<object onLoad={bar} />' },
7272
{ code: '<video allowFullScreen webkitAllowFullScreen mozAllowFullScreen />' },
73+
{ code: '<iframe allowFullScreen webkitAllowFullScreen mozAllowFullScreen />' },
7374
{ code: '<table border="1" />' },
7475
{ code: '<th abbr="abbr" />' },
7576
{ code: '<td abbr="abbr" />' },
@@ -513,7 +514,7 @@ ruleTester.run('no-unknown-property', rule, {
513514
data: {
514515
name: 'allowFullScreen',
515516
tagName: 'div',
516-
allowedTags: 'video',
517+
allowedTags: 'iframe, video',
517518
},
518519
},
519520
],

0 commit comments

Comments
 (0)