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

Commit

Permalink
prepare to release
Browse files Browse the repository at this point in the history
  • Loading branch information
Octane committed May 12, 2014
1 parent 867a9cf commit ae1bd87
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 251 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ global | `FormData()`<sup>[12](#FormData)</sup>, `Set()`, `Map()`, `WeakSet()`,
`HTMLScriptElement.prototype` | `.onload()`<sup>[10](#HTMLScriptElement.prototype.onload)</sup>, `.onerror()`<sup>[10](#HTMLScriptElement.prototype.onload)</sup>
`CSSStyleDeclaration.prototype` | `.getPropertyValue()`, `.removeProperty()`, `.setProperty()`, `.cssFloat`, `.opacity`
`document` | `.head`, `.createEvent()`<sup>[11](#document.createEvent)</sup>
`history` | `.pushState()`, `.replaceState()`, `.state`
`FormData.prototype` | `.append()`
`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()`
`XMLHttpRequest.prototype` | `.send()`<sup>[15](#XMLHttpRequest)</sup>, `.onload()`, `.onerror()`, `.onabort()`, `.addEventListener()`, `.removeEventListener()`, `.dispatchEvent()`
Expand Down
1 change: 0 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
##v0.4.6

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

##v0.4.5

Expand Down
44 changes: 0 additions & 44 deletions dev/jscore-ie9.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,50 +1368,6 @@ 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
44 changes: 0 additions & 44 deletions dev/jscore-polyfill-ie9.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,50 +1368,6 @@ 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
44 changes: 0 additions & 44 deletions dev/jscore-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -2410,50 +2410,6 @@ 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
44 changes: 0 additions & 44 deletions dev/jscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2410,50 +2410,6 @@ 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-ie9.js

Large diffs are not rendered by default.

Loading

0 comments on commit ae1bd87

Please sign in to comment.