basket.js
basket.js copied to clipboard
caching problem?
I'm trying to use basket.js
to load the script for our application.
The first try, when nothing is cached yet, looks fine.
On reload I get an error when trying to access $.mobile.activePage
(from jquery.mobile).
Funnily enough, that seems to happen in all Windows Desktop browsers, but not in Safari (MacOS and iOS) so far.
Any idea what's could have gone wrong here?
Update: it seems I found a workaround for the problem.
Originally I had a line $(document).ready(app.init);
in my application, which I changed to initializing at the end of the loader:
basket.require(jsfiles)
.then(function() {
app.init();
});
After changing the call app.init();
to asynchronous, things seem to be working again...
Yeah, document.ready will fire already when all "traditionally" loaded scripts are loaded. So this one should probably be closed?
Not really, in the then-clause of a Promise I shouldn't need to make my call asynchronous to make it work. Maybe just a problem of an old RSVP version?