Skip to content

Can anyone get this library to work? #10

Description

@chrisspen

I realize this project was abandoned years ago, but has anyone been able to get it to work?

I can't even get the storage initialization code to run. If I do something like:

var requestedBytes = 1024*1024*10; // MB

$(document).ready(function(){

    // Create a key-value store
    var storage = new LargeLocalStorage({size: requestedBytes, name: 'mydb'});

    // Await initialization of the storage area
    console.log('initializing storage')
    storage.initialized.then(function(grantedCapacity){
        // Check to see how much space the user authorized us to actually use.
        // Some browsers don't indicate how much space was granted in which case
        // grantedCapacity will be 1.
        if (grantedCapacity != -1 && grantedCapacity != requestedBytes) {
            console.log('error granting full capacity');
        }else{
            console.log('storage granted!')
        }
    });

});

and run it in a recent version of Chrome, the console shows initializing storage, but it never shows any of the log messages for when the storage is finished initializing, implying it never runs.

It looks like grantedCapacity is no longer an integer, but some sort of Object.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions