Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caching problem? #158

Open
ray007 opened this issue Nov 26, 2015 · 3 comments
Open

caching problem? #158

ray007 opened this issue Nov 26, 2015 · 3 comments

Comments

@ray007
Copy link

ray007 commented Nov 26, 2015

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?

@ray007
Copy link
Author

ray007 commented Dec 1, 2015

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...

@OMantere
Copy link

Yeah, document.ready will fire already when all "traditionally" loaded scripts are loaded. So this one should probably be closed?

@ray007
Copy link
Author

ray007 commented Dec 15, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants