diff --git a/README.md b/README.md index 8444066..21db05d 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,6 @@ Does not include JSON - use [json2.js](https://github.com/douglascrockford/JSON- ECMAScript "Harmony" (prollyfills) ------------------------------------- - "Harmony" is the aspirational term for the future of ECMAScript (the standardized version of JavaScript) beyond ES5. ### ES6 @@ -158,13 +157,9 @@ Originally specified separately, Typed Arrays are now included in ES6. Creating index getter/setters (i.e. `array[0]`, `array[1]`, etc) is slow and consumes significant memory. Arrays larger than 100k entries will be too slow to initialize in most cases so an upper limit is placed on the size of arrays and exception is thrown on construction. -### Binary Data - -[script](bindata.js) - -[demo page](http://inexorabletash.github.io/polyfill/demos/bindata.html) - -Proposed for ES7 - http://wiki.ecmascript.org/doku.php?id=harmony:binary_data +### Experimental +[ES7 Proposals](experimental/README.md) WHATWG URL API -------------- @@ -219,23 +214,6 @@ KeyboardEvent.queryKeyCap(code); window.identifyKey(keyboardEvent); ``` -W3C Web Storage ---------------- -[script](storage.js) - -[spec](http://dev.w3.org/html5/webstorage/) - -adapted from [Remy Sharp](https://gist.github.com/350433) - -```javascript -storage = window.localStorage -storage = window.sessionStorage -storage.clear() -valueString = storage.getItem(keyString) -valueString = storage.key(index) -storage.removeItem(keyString) -storage.setItem(keyString, valueString) -storage.length -```` - W3C Geolocation API ------------------- [script](geo.js) - @@ -249,63 +227,6 @@ var watchId = navigator.geolocation.watchPosition(successCallback, errorCallback navigator.geolocation.clearWatch(watchId); ``` -W3C Workers ------------ -[script](workers.js) - -[spec](http://dev.w3.org/html5/workers/) - -just for kicks; you probably don't want to use this - - -Console -------- -[script](console.js) - -[unit tests](http://inexorabletash.github.io/polyfill/tests/console.html) - -*de facto* standard in modern browsers based on [FireBug Console API](http://getfirebug.com/wiki/index.php/Console_API) - -```javascript -console.log(messageObject, arguments...); // and variations: debug, info, warn, error -console.assert(assertion, messageObject, arguments...); -console.count(name); -console.time(name); console.timeEnd(name); -console.group(name); console.groupEnd(); -console.trace(); -console.clear(); -``` - -Cookie API ----------- -[script](cookie.js) - -Adam Barth's [Cookie API proposal](https://docs.google.com/Doc?docid=0AZpchfQ5mBrEZGQ0cDh3YzRfMTRmdHFma21kMg&hl=en&pli=1) - -abandoned - -```javascript -var cookie = document.getCookie(name, callback); -alert(cookie.name); -alert(cookie.value); - -var cookieArray = document.getAllCookies(callback); -document.setCookie(cookie, errorCallback); -document.deleteCookie(name, errorCallback); -``` - -DOMException (helper) ---------------------- -[script](https://github.com/inexorabletash/polyfill/edit/master/domexception.js) - -[demo page](http://inexorabletash.github.io/polyfill/demos/domexception.html) - - -Creates a native DOMException of the specified type if possible, -otherwise a similar looking object. Useful when implementing other polyfills. - -```javascript -exception = DOMException.create(code) -``` - -sprintf (other) ---------------- -[script](sprintf.js) - -[unit tests](http://inexorabletash.github.io/polyfill/tests/sprintf.html) - -used for a few C-to-JavaScript porting projects - -```javascript -var str = sprintf("Foo %s bar %d", "hello", 123); -``` +Obsolete +-------- +[Obsolete and Unmaintained Polyfills](obsolete/README.md) diff --git a/experimental/README.md b/experimental/README.md new file mode 100644 index 0000000..6e88170 --- /dev/null +++ b/experimental/README.md @@ -0,0 +1,9 @@ +Experimental +============ + +### Binary Data + +[script](bindata.js) - +[demo page](http://inexorabletash.github.io/polyfill/experimental/demos/bindata.html) + +Proposed for ES7 - http://wiki.ecmascript.org/doku.php?id=harmony:binary_data diff --git a/bindata.js b/experimental/bindata.js similarity index 100% rename from bindata.js rename to experimental/bindata.js diff --git a/demos/bindata.html b/experimental/demos/bindata.html similarity index 100% rename from demos/bindata.html rename to experimental/demos/bindata.html diff --git a/obsolete/README.md b/obsolete/README.md new file mode 100644 index 0000000..d8eb740 --- /dev/null +++ b/obsolete/README.md @@ -0,0 +1,82 @@ +Obsolete +======== + +These are basically unmaintained dead ends. Use at your own risk. + +W3C Web Storage +--------------- +[script](storage.js) - +[spec](http://dev.w3.org/html5/webstorage/) - +adapted from [Remy Sharp](https://gist.github.com/350433) + +```javascript +storage = window.localStorage +storage = window.sessionStorage +storage.clear() +valueString = storage.getItem(keyString) +valueString = storage.key(index) +storage.removeItem(keyString) +storage.setItem(keyString, valueString) +storage.length +```` + +W3C Workers +----------- +[script](workers.js) - +[spec](http://dev.w3.org/html5/workers/) - +just for kicks; you probably don't want to use this + + +Console +------- +[script](console.js) - +[unit tests](http://inexorabletash.github.io/polyfill/tests/console.html) - +*de facto* standard in modern browsers based on [FireBug Console API](http://getfirebug.com/wiki/index.php/Console_API) + +```javascript +console.log(messageObject, arguments...); // and variations: debug, info, warn, error +console.assert(assertion, messageObject, arguments...); +console.count(name); +console.time(name); console.timeEnd(name); +console.group(name); console.groupEnd(); +console.trace(); +console.clear(); +``` + +Cookie API +---------- +[script](cookie.js) - +Adam Barth's [Cookie API proposal](https://docs.google.com/Doc?docid=0AZpchfQ5mBrEZGQ0cDh3YzRfMTRmdHFma21kMg&hl=en&pli=1) - +abandoned + +```javascript +var cookie = document.getCookie(name, callback); +alert(cookie.name); +alert(cookie.value); + +var cookieArray = document.getAllCookies(callback); +document.setCookie(cookie, errorCallback); +document.deleteCookie(name, errorCallback); +``` + +DOMException (helper) +--------------------- +[script](https://github.com/inexorabletash/polyfill/edit/master/domexception.js) - +[demo page](http://inexorabletash.github.io/polyfill/demos/domexception.html) - + +Creates a native DOMException of the specified type if possible, +otherwise a similar looking object. Useful when implementing other polyfills. + +```javascript +exception = DOMException.create(code) +``` + +sprintf (other) +--------------- +[script](sprintf.js) - +[unit tests](http://inexorabletash.github.io/polyfill/tests/sprintf.html) - +used for a few C-to-JavaScript porting projects + +```javascript +var str = sprintf("Foo %s bar %d", "hello", 123); +``` diff --git a/console.js b/obsolete/console.js similarity index 100% rename from console.js rename to obsolete/console.js diff --git a/cookie.js b/obsolete/cookie.js similarity index 100% rename from cookie.js rename to obsolete/cookie.js diff --git a/demos/domexception.html b/obsolete/demos/domexception.html similarity index 100% rename from demos/domexception.html rename to obsolete/demos/domexception.html diff --git a/domexception.js b/obsolete/domexception.js similarity index 100% rename from domexception.js rename to obsolete/domexception.js diff --git a/sprintf.js b/obsolete/sprintf.js similarity index 100% rename from sprintf.js rename to obsolete/sprintf.js diff --git a/storage.js b/obsolete/storage.js similarity index 100% rename from storage.js rename to obsolete/storage.js diff --git a/tests/console.html b/obsolete/tests/console.html similarity index 98% rename from tests/console.html rename to obsolete/tests/console.html index 6a02159..e40de8f 100644 --- a/tests/console.html +++ b/obsolete/tests/console.html @@ -12,7 +12,7 @@