开发者

dojo.xhrGet handle as javascript ie8 not returning

开发者 https://www.devze.com 2023-02-15 07:27 出处:网络
I have: dojo.xhrGet({ url:\"/data/js/1/markers.js\", handleAs:\"javascript\", load: function(r){ dojo.forEach(placemarks, function(item) {

I have:

dojo.xhrGet({
    url:"/data/js/1/markers.js",
    handleAs:"javascript",
    load: function(r){
        dojo.forEach(placemarks, function(item) {

Which works开发者_C百科 fine in Chrome, FF and Safari but not IE. Error placemarks is undefined is given. If I log r it gives me the first object in my array placemarks.

Am I missing something with IE or do I need to set a special header?


Dojo doesn't eval javascript globably when it comes back, so any variables must be assigned to the window:

window.placemarks = ...
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号