Skip to content

Commit

Permalink
fix: handle special case for allowfullscreen on <embed>
Browse files Browse the repository at this point in the history
close #6202
  • Loading branch information
yyx990803 committed Sep 1, 2017
1 parent 06741f3 commit d77b953
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/platforms/web/runtime/modules/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ function setAttr (el: Element, key: string, value: any) {
if (isFalsyAttrValue(value)) {
el.removeAttribute(key)
} else {
el.setAttribute(key, key)
// technically allowfullscreen is a boolean attribute for <iframe>,
// but Flash expects a value of "true" when used on <embed> tag
value = key === 'allowfullscreen' && el.tagName === 'EMBED'
? 'true'
: key
el.setAttribute(key, value)
}
} else if (isEnumeratedAttr(key)) {
el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true')
Expand Down

0 comments on commit d77b953

Please sign in to comment.