DSt icon indicating copy to clipboard operation
DSt copied to clipboard

DSt is a lightweight JavaScript library for HTML5 DOM Storage (localStorage). Ancient and unsupported!

                        _/_/_/      _/_/_/    _/
                       _/    _/  _/        _/_/_/_/
                      _/    _/    _/_/      _/
                     _/    _/        _/    _/
                    _/_/_/    _/_/_/        _/_/


 A simple, lightweight JavaScript library for using HTML5 DOM Storage

         copyright 2010  pete gamache  gamache@#$!@#$gmail.com

DSt is designed to make using HTML5 DOM Storage easy and automatic. DSt does not depend on any JavaScript frameworks and will work on any browser where localStorage is implemented (e.g. Firefox 3.5, IE 8, Safari 4, Chrome 4). DSt is also available as a jQuery plugin, jquery.dst.js.

Use DSt to get and set localStorage values with automatic JSON serialization/ deserialization, and store/recall form elements' or entire forms' state.

Usage:

DSt.set(key, value);         // sets stored value for given key
var value = DSt.get(key);    // returns stored value for given key

DSt.store(input_elt);        // stores value of a form input element
DSt.recall(input_elt);       // recalls stored value of a form input elt

DSt.store_form(form_elt);    // runs DSt.store(elt) on each form input
DSt.populate_form(form_elt); // runs DSt.recall(elt) on each form input

Element IDs may always be given in place of the elements themselves.
Values handled by DSt.get/DSt.set can be anything JSON-encodable.

You may use jQuery.DSt or $.DSt instead of DSt if you're using
  jquery.dst.js.