Skip to content
This repository has been archived by the owner on Aug 21, 2022. It is now read-only.

Commit

Permalink
build 0.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Octane committed May 22, 2014
1 parent 8457af0 commit 1e7820e
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 182 deletions.
8 changes: 8 additions & 0 deletions dev/jscore-ie10.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ if (!Object.is) {
};
}

//IE10+
if (!Object.setPrototypeOf) {
Object.setPrototypeOf = function (object, prototype) {
object.__proto__ = prototype;
return object;
};
}

if (!Array.from) {
Array.from = function (iterable, func, boundThis) {
if (!Object(iterable).length) {
Expand Down
52 changes: 8 additions & 44 deletions dev/jscore-ie9.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ if (!Object.is) {
};
}

//IE10+
if (!Object.setPrototypeOf) {
Object.setPrototypeOf = function (object, prototype) {
object.__proto__ = prototype;
return object;
};
}

if (!Array.from) {
Array.from = function (iterable, func, boundThis) {
if (!Object(iterable).length) {
Expand Down Expand Up @@ -1367,51 +1375,7 @@ window.FormData || (window.FormData = new function () {
});

history.pushState || new function () {
/*
console.log('history polyfill');
var proto = history.constructor.prototype,
loc = window.location,
states = {},
state = null,
skip = {};
function onPopState() {
var event = document.createEvent('CustomEvent');
event.initEvent('popstate', false, false);
event.state = state;
window.dispatchEvent(event);
}
proto.pushState = function (state, title, hash) {
if (!hash.startsWith('#')) {
hash = '#' + hash;
}
states[hash] = state;
skip[hash] = true;
loc.hash = hash;
};

proto.replaceState = function (state, title, hash) {
throw Error('history.replaceState not implemented');
};
Object.defineProperty(proto, 'state', {
get: function () {
return state;
}
});
window.addEventListener('hashchange', function (event) {
var hash = loc.hash;
if (skip[hash]) {
delete skip[hash];
} else {
state = states[hash] || null;
onPopState();
}
});
*/
};

window.lib = {};
Expand Down
8 changes: 8 additions & 0 deletions dev/jscore-polyfill-ie10.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ if (!Object.is) {
};
}

//IE10+
if (!Object.setPrototypeOf) {
Object.setPrototypeOf = function (object, prototype) {
object.__proto__ = prototype;
return object;
};
}

if (!Array.from) {
Array.from = function (iterable, func, boundThis) {
if (!Object(iterable).length) {
Expand Down
52 changes: 8 additions & 44 deletions dev/jscore-polyfill-ie9.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ if (!Object.is) {
};
}

//IE10+
if (!Object.setPrototypeOf) {
Object.setPrototypeOf = function (object, prototype) {
object.__proto__ = prototype;
return object;
};
}

if (!Array.from) {
Array.from = function (iterable, func, boundThis) {
if (!Object(iterable).length) {
Expand Down Expand Up @@ -1367,51 +1375,7 @@ window.FormData || (window.FormData = new function () {
});

history.pushState || new function () {
/*
console.log('history polyfill');
var proto = history.constructor.prototype,
loc = window.location,
states = {},
state = null,
skip = {};
function onPopState() {
var event = document.createEvent('CustomEvent');
event.initEvent('popstate', false, false);
event.state = state;
window.dispatchEvent(event);
}
proto.pushState = function (state, title, hash) {
if (!hash.startsWith('#')) {
hash = '#' + hash;
}
states[hash] = state;
skip[hash] = true;
loc.hash = hash;
};

proto.replaceState = function (state, title, hash) {
throw Error('history.replaceState not implemented');
};
Object.defineProperty(proto, 'state', {
get: function () {
return state;
}
});
window.addEventListener('hashchange', function (event) {
var hash = loc.hash;
if (skip[hash]) {
delete skip[hash];
} else {
state = states[hash] || null;
onPopState();
}
});
*/
};

};//the end of jsCore
52 changes: 8 additions & 44 deletions dev/jscore-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,14 @@ if (!Object.is) {
};
}

//IE10+
if (!Object.setPrototypeOf) {
Object.setPrototypeOf = function (object, prototype) {
object.__proto__ = prototype;
return object;
};
}

if (!Array.from) {
Array.from = function (iterable, func, boundThis) {
if (!Object(iterable).length) {
Expand Down Expand Up @@ -2409,51 +2417,7 @@ window.getComputedStyle || (window.getComputedStyle = new function () {
});

history.pushState || new function () {
/*
console.log('history polyfill');
var proto = history.constructor.prototype,
loc = window.location,
states = {},
state = null,
skip = {};
function onPopState() {
var event = document.createEvent('CustomEvent');
event.initEvent('popstate', false, false);
event.state = state;
window.dispatchEvent(event);
}

proto.pushState = function (state, title, hash) {
if (!hash.startsWith('#')) {
hash = '#' + hash;
}
states[hash] = state;
skip[hash] = true;
loc.hash = hash;
};
proto.replaceState = function (state, title, hash) {
throw Error('history.replaceState not implemented');
};
Object.defineProperty(proto, 'state', {
get: function () {
return state;
}
});
window.addEventListener('hashchange', function (event) {
var hash = loc.hash;
if (skip[hash]) {
delete skip[hash];
} else {
state = states[hash] || null;
onPopState();
}
});
*/
};

};//the end of jsCore
52 changes: 8 additions & 44 deletions dev/jscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,14 @@ if (!Object.is) {
};
}

//IE10+
if (!Object.setPrototypeOf) {
Object.setPrototypeOf = function (object, prototype) {
object.__proto__ = prototype;
return object;
};
}

if (!Array.from) {
Array.from = function (iterable, func, boundThis) {
if (!Object(iterable).length) {
Expand Down Expand Up @@ -2409,51 +2417,7 @@ window.getComputedStyle || (window.getComputedStyle = new function () {
});

history.pushState || new function () {
/*
console.log('history polyfill');
var proto = history.constructor.prototype,
loc = window.location,
states = {},
state = null,
skip = {};
function onPopState() {
var event = document.createEvent('CustomEvent');
event.initEvent('popstate', false, false);
event.state = state;
window.dispatchEvent(event);
}
proto.pushState = function (state, title, hash) {
if (!hash.startsWith('#')) {
hash = '#' + hash;
}
states[hash] = state;
skip[hash] = true;
loc.hash = hash;
};

proto.replaceState = function (state, title, hash) {
throw Error('history.replaceState not implemented');
};
Object.defineProperty(proto, 'state', {
get: function () {
return state;
}
});
window.addEventListener('hashchange', function (event) {
var hash = loc.hash;
if (skip[hash]) {
delete skip[hash];
} else {
state = states[hash] || null;
onPopState();
}
});
*/
};

window.lib = {};
Expand Down
2 changes: 1 addition & 1 deletion min/jscore-ie10.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion min/jscore-ie9.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion min/jscore-polyfill-ie10.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1e7820e

Please sign in to comment.