Skip to content
This repository has been archived by the owner on Nov 18, 2017. It is now read-only.

Commit

Permalink
removed length bug for userData implementation in removeItem()
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Wejrowski committed Nov 26, 2011
1 parent f52450c commit 59e85ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**********************************************************/
Gracefully Degrading HTML5 Local Storage
Cross Browser HTML5 Local Storage Support
/**********************************************************/
Brett Wejrowski
The Wojo Group
thewojogroup.com
Wojo Design
wojodesign.com
brett@wejrowski.com


The script implements a replacement for HTML5's localStorage, when it is not supported,
by using strings of name/value pairs that are stored in cookies. It implements a nearly
identical interface. You can find the spec of the HTML5 storage at
The script implements a replacement for HTML5's localStorage when it is not supported.
It implements a nearly identical interface using userData for IE6-7 and globalStorage
for FF2-3. You can find the spec of the HTML5 storage at
http://www.w3.org/TR/2009/WD-webstorage-20091222/


Expand Down
5 changes: 4 additions & 1 deletion storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ Dual licensed under the MIT or GPL licenses.
div.removeAttribute( key );

div.save( attrKey );
this.length=0;
this.length--;
if( this.length < 0){
this.length=0;
}
},

"clear":function(){
Expand Down
2 changes: 1 addition & 1 deletion storage.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59e85ad

Please sign in to comment.