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

Commit 1e7820e

Browse files
committed
build 0.4.7
1 parent 8457af0 commit 1e7820e

12 files changed

+54
-182
lines changed

dev/jscore-ie10.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ if (!Object.is) {
5454
};
5555
}
5656

57+
//IE10+
58+
if (!Object.setPrototypeOf) {
59+
Object.setPrototypeOf = function (object, prototype) {
60+
object.__proto__ = prototype;
61+
return object;
62+
};
63+
}
64+
5765
if (!Array.from) {
5866
Array.from = function (iterable, func, boundThis) {
5967
if (!Object(iterable).length) {

dev/jscore-ie9.js

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ if (!Object.is) {
5454
};
5555
}
5656

57+
//IE10+
58+
if (!Object.setPrototypeOf) {
59+
Object.setPrototypeOf = function (object, prototype) {
60+
object.__proto__ = prototype;
61+
return object;
62+
};
63+
}
64+
5765
if (!Array.from) {
5866
Array.from = function (iterable, func, boundThis) {
5967
if (!Object(iterable).length) {
@@ -1367,51 +1375,7 @@ window.FormData || (window.FormData = new function () {
13671375
});
13681376

13691377
history.pushState || new function () {
1370-
/*
1371-
console.log('history polyfill');
1372-
1373-
var proto = history.constructor.prototype,
1374-
loc = window.location,
1375-
states = {},
1376-
state = null,
1377-
skip = {};
1378-
1379-
function onPopState() {
1380-
var event = document.createEvent('CustomEvent');
1381-
event.initEvent('popstate', false, false);
1382-
event.state = state;
1383-
window.dispatchEvent(event);
1384-
}
1385-
1386-
proto.pushState = function (state, title, hash) {
1387-
if (!hash.startsWith('#')) {
1388-
hash = '#' + hash;
1389-
}
1390-
states[hash] = state;
1391-
skip[hash] = true;
1392-
loc.hash = hash;
1393-
};
13941378

1395-
proto.replaceState = function (state, title, hash) {
1396-
throw Error('history.replaceState not implemented');
1397-
};
1398-
1399-
Object.defineProperty(proto, 'state', {
1400-
get: function () {
1401-
return state;
1402-
}
1403-
});
1404-
1405-
window.addEventListener('hashchange', function (event) {
1406-
var hash = loc.hash;
1407-
if (skip[hash]) {
1408-
delete skip[hash];
1409-
} else {
1410-
state = states[hash] || null;
1411-
onPopState();
1412-
}
1413-
});
1414-
*/
14151379
};
14161380

14171381
window.lib = {};

dev/jscore-polyfill-ie10.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ if (!Object.is) {
5454
};
5555
}
5656

57+
//IE10+
58+
if (!Object.setPrototypeOf) {
59+
Object.setPrototypeOf = function (object, prototype) {
60+
object.__proto__ = prototype;
61+
return object;
62+
};
63+
}
64+
5765
if (!Array.from) {
5866
Array.from = function (iterable, func, boundThis) {
5967
if (!Object(iterable).length) {

dev/jscore-polyfill-ie9.js

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ if (!Object.is) {
5454
};
5555
}
5656

57+
//IE10+
58+
if (!Object.setPrototypeOf) {
59+
Object.setPrototypeOf = function (object, prototype) {
60+
object.__proto__ = prototype;
61+
return object;
62+
};
63+
}
64+
5765
if (!Array.from) {
5866
Array.from = function (iterable, func, boundThis) {
5967
if (!Object(iterable).length) {
@@ -1367,51 +1375,7 @@ window.FormData || (window.FormData = new function () {
13671375
});
13681376

13691377
history.pushState || new function () {
1370-
/*
1371-
console.log('history polyfill');
1372-
1373-
var proto = history.constructor.prototype,
1374-
loc = window.location,
1375-
states = {},
1376-
state = null,
1377-
skip = {};
1378-
1379-
function onPopState() {
1380-
var event = document.createEvent('CustomEvent');
1381-
event.initEvent('popstate', false, false);
1382-
event.state = state;
1383-
window.dispatchEvent(event);
1384-
}
1385-
1386-
proto.pushState = function (state, title, hash) {
1387-
if (!hash.startsWith('#')) {
1388-
hash = '#' + hash;
1389-
}
1390-
states[hash] = state;
1391-
skip[hash] = true;
1392-
loc.hash = hash;
1393-
};
13941378

1395-
proto.replaceState = function (state, title, hash) {
1396-
throw Error('history.replaceState not implemented');
1397-
};
1398-
1399-
Object.defineProperty(proto, 'state', {
1400-
get: function () {
1401-
return state;
1402-
}
1403-
});
1404-
1405-
window.addEventListener('hashchange', function (event) {
1406-
var hash = loc.hash;
1407-
if (skip[hash]) {
1408-
delete skip[hash];
1409-
} else {
1410-
state = states[hash] || null;
1411-
onPopState();
1412-
}
1413-
});
1414-
*/
14151379
};
14161380

14171381
};//the end of jsCore

dev/jscore-polyfill.js

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,14 @@ if (!Object.is) {
425425
};
426426
}
427427

428+
//IE10+
429+
if (!Object.setPrototypeOf) {
430+
Object.setPrototypeOf = function (object, prototype) {
431+
object.__proto__ = prototype;
432+
return object;
433+
};
434+
}
435+
428436
if (!Array.from) {
429437
Array.from = function (iterable, func, boundThis) {
430438
if (!Object(iterable).length) {
@@ -2409,51 +2417,7 @@ window.getComputedStyle || (window.getComputedStyle = new function () {
24092417
});
24102418

24112419
history.pushState || new function () {
2412-
/*
2413-
console.log('history polyfill');
2414-
2415-
var proto = history.constructor.prototype,
2416-
loc = window.location,
2417-
states = {},
2418-
state = null,
2419-
skip = {};
2420-
2421-
function onPopState() {
2422-
var event = document.createEvent('CustomEvent');
2423-
event.initEvent('popstate', false, false);
2424-
event.state = state;
2425-
window.dispatchEvent(event);
2426-
}
24272420

2428-
proto.pushState = function (state, title, hash) {
2429-
if (!hash.startsWith('#')) {
2430-
hash = '#' + hash;
2431-
}
2432-
states[hash] = state;
2433-
skip[hash] = true;
2434-
loc.hash = hash;
2435-
};
2436-
2437-
proto.replaceState = function (state, title, hash) {
2438-
throw Error('history.replaceState not implemented');
2439-
};
2440-
2441-
Object.defineProperty(proto, 'state', {
2442-
get: function () {
2443-
return state;
2444-
}
2445-
});
2446-
2447-
window.addEventListener('hashchange', function (event) {
2448-
var hash = loc.hash;
2449-
if (skip[hash]) {
2450-
delete skip[hash];
2451-
} else {
2452-
state = states[hash] || null;
2453-
onPopState();
2454-
}
2455-
});
2456-
*/
24572421
};
24582422

24592423
};//the end of jsCore

dev/jscore.js

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,14 @@ if (!Object.is) {
425425
};
426426
}
427427

428+
//IE10+
429+
if (!Object.setPrototypeOf) {
430+
Object.setPrototypeOf = function (object, prototype) {
431+
object.__proto__ = prototype;
432+
return object;
433+
};
434+
}
435+
428436
if (!Array.from) {
429437
Array.from = function (iterable, func, boundThis) {
430438
if (!Object(iterable).length) {
@@ -2409,51 +2417,7 @@ window.getComputedStyle || (window.getComputedStyle = new function () {
24092417
});
24102418

24112419
history.pushState || new function () {
2412-
/*
2413-
console.log('history polyfill');
2414-
2415-
var proto = history.constructor.prototype,
2416-
loc = window.location,
2417-
states = {},
2418-
state = null,
2419-
skip = {};
2420-
2421-
function onPopState() {
2422-
var event = document.createEvent('CustomEvent');
2423-
event.initEvent('popstate', false, false);
2424-
event.state = state;
2425-
window.dispatchEvent(event);
2426-
}
2427-
2428-
proto.pushState = function (state, title, hash) {
2429-
if (!hash.startsWith('#')) {
2430-
hash = '#' + hash;
2431-
}
2432-
states[hash] = state;
2433-
skip[hash] = true;
2434-
loc.hash = hash;
2435-
};
24362420

2437-
proto.replaceState = function (state, title, hash) {
2438-
throw Error('history.replaceState not implemented');
2439-
};
2440-
2441-
Object.defineProperty(proto, 'state', {
2442-
get: function () {
2443-
return state;
2444-
}
2445-
});
2446-
2447-
window.addEventListener('hashchange', function (event) {
2448-
var hash = loc.hash;
2449-
if (skip[hash]) {
2450-
delete skip[hash];
2451-
} else {
2452-
state = states[hash] || null;
2453-
onPopState();
2454-
}
2455-
});
2456-
*/
24572421
};
24582422

24592423
window.lib = {};

min/jscore-ie10.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

min/jscore-ie9.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

min/jscore-polyfill-ie10.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)