Skip to content

Commit

Permalink
Improve plugin version code
Browse files Browse the repository at this point in the history
  • Loading branch information
lifesinger committed Sep 6, 2012
1 parent 1d17c37 commit 4a18bda
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/plugins/plugin-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ define('seajs/plugin-storage', ['./plugin-base', 'store', 'manifest'], function(
else {
var realPath = getRealPath(url, storedManifest)

// TODO:
// 这里应该不能应该 xhr,否则线上一跨域就不可用
// 应该还是用 util.fetch 去取,然后拿 seajs.cache 中的内容存起来
// 有点小麻烦
util.xhr(realPath, function(code) {
parseInt(seajs.pluginSDK.config.debug) == 2 || ( storedManifest[url] && store.set(url, code) )
storedManifest[url] && store.set(url, code)
util.globalEval(code)
callback()
})
}

}
})

Expand Down

0 comments on commit 4a18bda

Please sign in to comment.