Open danielweck opened 8 years ago
TODO: ensure that the jQuerySizes plugin works with jQuery 2.x !! https://github.com/bramstein/jsizes
See: https://github.com/readium/readium-shared-js/issues/305#issuecomment-231363196 (cc @olivierkorner )
https://github.com/readium/readium-shared-js/blob/develop/package.cson#L111 Dependency on jQuery "latest"! https://github.com/bramstein/jsizes/blob/master/package.json#L28
Update regarding jQuerySizes (see above comment): the code works with jQuery 2.x just fine (hasn't changed since jQuery 3.x was announced), even though package.json
references "latest".
Any update on this ? As I need to use jquery version 3.x but it is giving error in iframe_zip_loader.js
As per the links in this issue's original description, there are many other breaking changes in jQuery v3. We would need to assess whether any of them would introduce regression bugs in Readium, before making the decision to upgrade from v2.
As for the iframe_zip_loader.js
errors, could you please provide more information? Thank you!
Hi @danielweck ,
I was getting error on the following line in iframe_zip_loader.js
$('svg', doc).load(function(){
console.log('SVG loaded');
});
Its failing as jquery has changed the implementation of load function. Please refer the following link for more info. https://jquery.com/upgrade-guide/3.0/#breaking-change-load-unload-and-error-removed
So when I changed my code as following my issue was resolved
$('svg', doc).on("load", function(){
console.log('SVG loaded');
});
But I agree with your point that there may be many such other breaking changes in jQuery v3 so I am trying to use jQuery v2 only as of now.
Thank you @nandita121189 I pre-emptively fixed the load
event:
https://github.com/readium/readium-js/commit/08f3e4ed85e0ea6cb5e47a9b216bfa04bf67569a
Note: output bundle contains two versions of jQuery. v3 is needed for Rollup support etc. in CFI lib. Ultimately, we want to remove the jQuery dependency altogether. @JCCR
https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ https://jquery.com/upgrade-guide/3.0/