Skip to content

Commit adcb7c3

Browse files
yyx990803张祥闰
authored and
张祥闰
committed
fix: handle special case for allowfullscreen on <embed>
close vuejs#6202
1 parent 81ef3d5 commit adcb7c3

File tree

1 file changed

+6
-1
lines changed
  • src/platforms/web/runtime/modules

1 file changed

+6
-1
lines changed

src/platforms/web/runtime/modules/attrs.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ function setAttr (el: Element, key: string, value: any) {
6464
if (isFalsyAttrValue(value)) {
6565
el.removeAttribute(key)
6666
} else {
67-
el.setAttribute(key, key)
67+
// technically allowfullscreen is a boolean attribute for <iframe>,
68+
// but Flash expects a value of "true" when used on <embed> tag
69+
value = key === 'allowfullscreen' && el.tagName === 'EMBED'
70+
? 'true'
71+
: key
72+
el.setAttribute(key, value)
6873
}
6974
} else if (isEnumeratedAttr(key)) {
7075
el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true')

0 commit comments

Comments
 (0)