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

Commit ae1bd87

Browse files
committed
prepare to release
1 parent 867a9cf commit ae1bd87

File tree

12 files changed

+5
-251
lines changed

12 files changed

+5
-251
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ global | `FormData()`<sup>[12](#FormData)</sup>, `Set()`, `Map()`, `WeakSet()`,
8787
`HTMLScriptElement.prototype` | `.onload()`<sup>[10](#HTMLScriptElement.prototype.onload)</sup>, `.onerror()`<sup>[10](#HTMLScriptElement.prototype.onload)</sup>
8888
`CSSStyleDeclaration.prototype` | `.getPropertyValue()`, `.removeProperty()`, `.setProperty()`, `.cssFloat`, `.opacity`
8989
`document` | `.head`, `.createEvent()`<sup>[11](#document.createEvent)</sup>
90-
`history` | `.pushState()`, `.replaceState()`, `.state`
9190
`FormData.prototype` | `.append()`
9291
`Event.prototype`<sup>[13](#Event.prototype)</sup> | `.initEvent()`<sup>[14](#Event.prototype.initEvent)</sup>, `.initUIEvent()`<sup>[14](#Event.prototype.initEvent)</sup>, `.initMouseEvent()`<sup>[14](#Event.prototype.initEvent)</sup>, `.initCustomEvent()`
9392
`XMLHttpRequest.prototype` | `.send()`<sup>[15](#XMLHttpRequest)</sup>, `.onload()`, `.onerror()`, `.onabort()`, `.addEventListener()`, `.removeEventListener()`, `.dispatchEvent()`

changelog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
##v0.4.6
44

55
- many `Promise` [fixes](https://github.com/Octane/Promise/releases)
6-
- new: history API polyfill
76

87
##v0.4.5
98

dev/jscore-ie9.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,50 +1368,6 @@ window.FormData || (window.FormData = new function () {
13681368

13691369
history.pushState || new function () {
13701370

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-
};
1394-
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-
14151371
};
14161372

14171373
window.lib = {};

dev/jscore-polyfill-ie9.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,50 +1368,6 @@ window.FormData || (window.FormData = new function () {
13681368

13691369
history.pushState || new function () {
13701370

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-
};
1394-
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-
14151371
};
14161372

14171373
};//the end of jsCore

dev/jscore-polyfill.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,50 +2410,6 @@ window.getComputedStyle || (window.getComputedStyle = new function () {
24102410

24112411
history.pushState || new function () {
24122412

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-
};
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-
24572413
};
24582414

24592415
};//the end of jsCore

dev/jscore.js

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2410,50 +2410,6 @@ window.getComputedStyle || (window.getComputedStyle = new function () {
24102410

24112411
history.pushState || new function () {
24122412

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-
};
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-
24572413
};
24582414

24592415
window.lib = {};

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.

0 commit comments

Comments
 (0)