ProjectMirador / mirador

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
https://projectmirador.org
Apache License 2.0
549 stars 258 forks source link

Synchronous XMLHTTPRequest deprecated in chrome. #388

Closed aeschylus closed 8 years ago

aeschylus commented 9 years ago

Newest chrome has deprecated all synchronous ajax requests (for good reason). Mirador is now complaining about them. We shouldn't have any of these anyway, so we'll see where they're hiding. Find them and destroy them.

pobocks commented 9 years ago

Hello, this is Dave from HUIT -> LTS.

I'm working on familiarizing myself with the code base, and am doing so partly through picking off low-hanging fruit from the issue queue. Feel free to ignore the PR if it's not useful/duplicates effort.

aeschylus commented 9 years ago

Thanks for the contribution. I will pull it down and have a look. The diff looks pretty straightforward.

If you're looking to familiarise yourself with the codebase, a great place to start is with the mirador.js file. That is our entry point (fired off when the page loads/Mirador({...}) is called. Everything spiders down from there.

Most of our requests are done using promises/deferred objects, but not all of them have been migrated to that pattern.

Thanks for your interest, and I look forward to merging this pull request.

pobocks commented 9 years ago

I left getJsonFromUrl and its tests around because I think there's an issue with the tests which could show up in other places. I'm writing an issue for that, and will reference this PR there.

rsinghal commented 8 years ago

At least one culprit is i18next. We force the resource file to load asynchronously or the translations won't be fully loaded before the dom elements are populated. Doing #935 should give us the option to handle the loading of the resource file differently, using one of these backends: http://i18next.com/docs/ecosystem/#plugins

aeschylus commented 8 years ago

My pr fixed that. https://github.com/IIIF/mirador/pull/920

https://github.com/IIIF/mirador/pull/920#issue-154035638 Do you want to re-open and I can merge your approach to the dev/GB issue, then we can integrate it into 2.1?

rsinghal commented 8 years ago

I didn't realize you had also changed viewer.js - thought you just added the new files. I think you already merged my PR with the extra settings, so I'm just going to submit a new PR with your changes to viewer.js.