Skip to content

Commit

Permalink
fix ms-src不能加载SWF BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
RubyLouvre committed Oct 16, 2014
1 parent 5bf4c5c commit 33500ce
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
7 changes: 7 additions & 0 deletions avalon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2539,6 +2539,7 @@
return elem[bool] = !!val
}
}
console.log(attrName)
var toRemove = (val === false) || (val === null) || (val === void 0)
if (!W3C && propMap[attrName]) {//旧式IE下需要进行名字映射
attrName = propMap[attrName]
Expand Down Expand Up @@ -2629,6 +2630,12 @@
val = val.replace(/&/g, "&") //处理IE67自动转义的问题
}
elem[method] = val
if (window.chrome && elem.tagName === "EMBED") {
var parent = elem.parentNode//#525 chrome1-37下embed标签动态设置src不能发生请求
var comment = document.createComment("ms-src")
parent.replaceChild(comment, elem)
parent.replaceChild(elem, comment)
}
}
},
"class": function(val, elem, data) {
Expand Down
8 changes: 7 additions & 1 deletion avalon.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,12 @@
}
} else {
elem[method] = val
if (window.chrome && elem.tagName === "EMBED") {
var parent = elem.parentNode//#525 chrome1-37下embed标签动态设置src不能发生请求
var comment = document.createComment("ms-src")
parent.replaceChild(comment, elem)
parent.replaceChild(elem, comment)
}
}
},
"class": function(val, elem, data) {
Expand Down Expand Up @@ -2713,7 +2719,7 @@
case "number":
return isFinite(val) || val === "" ? parseFloat(val) || 0 : val
default:
return val
return val
}
}

Expand Down
12 changes: 9 additions & 3 deletions examples/avalon.$events.js
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@
lruHash = {},
freshEnd = null,
staleEnd = null
capacity = typeof capacity === "number" ? capacity : Number.MAX_VALUE
capacity = typeof capacity === "number" ? capacity : Number.MAX_VALUE
//生成一个LRU缓体实体
return avalonCaches[cacheId] = {
set: function(key, value) {
Expand Down Expand Up @@ -2853,6 +2853,12 @@
val = val.replace(/&/g, "&") //处理IE67自动转义的问题
}
elem[method] = val
if (window.chrome && elem.tagName === "EMBED") {
var parent = elem.parentNode//#525 chrome1-37下embed标签动态设置src不能发生请求
var comment = document.createComment("ms-src")
parent.replaceChild(comment, elem)
parent.replaceChild(elem, comment)
}
}
},
"class": function(val, elem, data) {
Expand Down Expand Up @@ -4347,8 +4353,8 @@
ww: weekGetter(2),
w: weekGetter(1)
}
var DATE_FORMATS_SPLIT =/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,
NUMBER_STRING = /^\-?\d+$/;
var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,
NUMBER_STRING = /^\-?\d+$/;
var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/
// 1 2 3 4 5 6 7 8 9 10 11

Expand Down

0 comments on commit 33500ce

Please sign in to comment.