Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Latest commit

 

History

History
90 lines (72 loc) · 2.41 KB

README.md

File metadata and controls

90 lines (72 loc) · 2.41 KB

Obsolete

These are basically unmaintained dead ends. Use at your own risk.

W3C Web Storage

script - spec - adapted from Remy Sharp

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 - spec - just for kicks; you probably don't want to use this

Console

script - unit tests - de facto standard in modern browsers based on FireBug Console API

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 - Adam Barth's Cookie API proposal - abandoned

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 - demo page -

Creates a native DOMException of the specified type if possible, otherwise a similar looking object. Useful when implementing other polyfills.

exception = DOMException.create(code)

sprintf (other)

script - unit tests - used for a few C-to-JavaScript porting projects

var str = sprintf("Foo %s bar %d", "hello", 123);

Binary Data

script - demo page

Abandoned proposal for ECMAScript http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects