Issue with Enyo 2.2.0 in enyo.load() function

I have upgraded my enyo source code to latest library of enyo. But enyo.load() function is not working as it was working in previous version.

I went through the thread at "https://enyojs.atlassian.net/browse/ENYO-1825" (https://enyojs.atlassian.net/browse/ENYO-1825) but solutions didn't work for me.

After making changes in loader.js, boot.js and LoaderTest.js , It is not loading the first page itself.

Please guide me

Comments

  • can you share an example of what's not working? The fix for that bug has already been merged into master so you shouldn't have to change anything (unless you're reverting the change).
  • edited March 2013
    We are including two external js in onDeviceReady() function in index.html

    which are not the part of enyo source package.

    Through this code
    function onDeviceReady() {
    
     enyo.load(['plugins/X.js', 'plugins/Y.js'], function () {});
    
    }
    1) In X.js there is an Async call which is called itself while loading X.js.
    2) Y.js has dependency on X.js

    This code was working fine with the previous version of enyo library.

    After upgradation it is working fine on android but in iOS it is not able to load 2nd js file.
  • Do you get any error messages or does it just not load that file?
  • edited March 2013
    i'm curious if iOS doesn't support the onload/onerror callbacks for the tag. That would match the symptom (loading first file and then seemingly aborting) but I don't have an iOS device on which I could test that.
  • I have checked the same scenario....... it is not loading the 2nd file ...
    Have you people changed the way of execution of eny.load(), b'coz it was working fine with till enyo 2.1.1
  • We took Ryan's patch just after the 2.2.0 tag (https://github.com/enyojs/enyo/pull/219)

    Before that, last real change was https://github.com/enyojs/enyo/commit/4fab9ef946f6f9d752b2943e8e6c544ab001c3b9, fixing events on script tags. Before that (in the 2.1.1 code), we weren't using the correct names so the handlers should never have been called.

  • In my case it is going to Y.js but control is somewhere lost after making the Async Ajax call.
  • I don't quite understand the behavior you're seeing. Is Y loaded but failing somehow or is your callback not happening?

    Here's a basic fiddle that illustrates enyo.load. Might be worth trying from iOS to verify it works in the browser. If you can modify it to include your plugins, that might help as well. It's not running through PhoneGap so it's not an ideal test case but perhaps it gets us closer.

    http://jsfiddle.net/QCZHn/1/
  • Sorry Ryan I am on leave, and didn't get time to try your suggestion, I'll get back to u on Wednesday ...
    One thing I noticed last time was timeout also not working properly with webservice callback
Sign In or Register to comment.