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

async true version release. #33

Closed
dongully opened this issue Feb 12, 2016 · 3 comments
Closed

async true version release. #33

dongully opened this issue Feb 12, 2016 · 3 comments

Comments

@dongully
Copy link

I have same problem with this post.
#25

Trying async: true settings, but haven't clear warning.
And I inspected the code in latest 1.2.0 version.
But, in ver.1.2.0, settings.async seems to be ignored.

** ver.1.2.0 **

function loadAndParseFile(filename, settings) {
    $.ajax({
        url:        filename,
        async:      false,
        cache:      settings.cache,
        contentType:'text/plain;charset='+ settings.encoding,
        dataType:   'text',
        success:    function(data, status) {
                        parseData(data, settings.mode); 
                    }
    });
}

** latest code **

function loadAndParseFile(filename, settings) {
    $.ajax({
        url: filename,
        async: settings.async,
        cache: settings.cache,
        dataType: 'text',
        success: function (data, status) {
        parseData(data, settings.mode);
            callbackIfComplete(settings);
        },
        error: function (jqXHR, textStatus, errorThrown) {
            console.log('Failed to download or parse ' + filename);
            callbackIfComplete(settings);
        }
    });
}

When do you release async true version.

@adrianfish
Copy link
Contributor

You supply the async flag in the settings object. That way it's all under the control of the calling code.

@dongully
Copy link
Author

yes, using that way, I cat avoid warning 'using latestcode'.
but 'using latest release(ver.1.2.0)', can't avoid.
because loadAndParseFile method is older.
I'm using webjar, so please release latestcode.

@dongully
Copy link
Author

Using latest release(ver.1.2.2), I can avoid async problem.
thank you.

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