javascript - Issue with Google Gears and jQuery creating a managedStore -


I am trying to create a managed store to cache JS, IMG, SDF and CSS from a Webstable. I .

Here is the code:

  $ (document) .ready (function () {var manifestName = 'cache_manifest.json'; var storeName = 'cache'; Var LocalServer ; Var LocalStore; if (window & amp; google.gears) {localRequest = google.gears.factory.create ('beta.httprequest'); local server = google.gears.factory.create ('Beta Localstore = localServer.openManagedStore (StoreName); Haserver available (); $ ("# separator"). Text ('|'); if (local store) {localStore = localServer.createManagedStore (storeName); localStore LocalStore = manifestName; localStore.errorerror = $ ( '# Offline'). Text ('Error Conscious Al Cache'); localStore.oncomplete = $ ('# offline'). Text ('Cache Activation'); loca LStore.onprogress = $ ('# offli ('(Event.filesComplete / event.filesTotal) * 100)); localStore.checkForUpdate ();} and {$ (' # offline '). Text (' Cache activation ');}}};  

However, localast. Terror is always triggered.

I have a question:

  • Any ideas what is going wrong?
  • How do I get real error (Alert (Local Store will not work

Regards,

Try

  if (! Local store) {localStore = localServer.createManagedStore (storeName); LocalStore.manifestUrl = manifestName; LocalStore.errorerror = function ($ '' 'Offline'). Text ('error con el cache');} localStore.oncomplete = function () {$ ('# offline'). Text ('Cache Activation');} LocalStore.onprogress = (Function () ($ ('# offline'). Text (mathematics.cyl (((event.filesComplete / event.filesTotal) * 100)) + "%");} localStore.checkForUpdate ();}  

You have to specify the context of the function, which You should call on a specific event. You were calling these functions, and in the end, the properties of horror, incomplete and progress were placed in jQuery examples returned by $ ('# offline'). .. ')


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -