Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phloe committed Jan 3, 2013
1 parent 26e0de6 commit e57991d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions _amoeba.js
Expand Up @@ -265,13 +265,13 @@ this._amoeba = this._amoeba || (function (global, document) {


load: function (url, callback) {
var script = create("script", document.body);
var script = wrap(create("script", document.body));

if (callback) {
script.on("load", callback);
}

script.src = url;
script.el.src = url;

return script;
},
Expand All @@ -296,9 +296,9 @@ this._amoeba = this._amoeba || (function (global, document) {

xhr.open(mode, url, async);

each(headers, function (value, key) {
xhr.setRequestHeader(key, value);
});
for (var key in headers) {
xhr.setRequestHeader(key, headers[key]);
}

if (callback) {
xhr.onload = function () {
Expand Down Expand Up @@ -354,8 +354,6 @@ this._amoeba = this._amoeba || (function (global, document) {

Wrapper = function (element) {
this.el = element || null;

return this;
};

Wrapper.prototype = {
Expand Down

0 comments on commit e57991d

Please sign in to comment.