~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/yuilib/3.9.1/build/yql-jsonp/yql-jsonp.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
2
 
YUI.add('yql-jsonp', function (Y, NAME) {
3
 
 
4
 
/**
5
 
* Plugin for YQL to use JSONP to make YQL requests. This is the default method,
6
 
* when loaded in nodejs or winjs this will not load. The new module is needed
7
 
* to make sure that JSONP is not loaded in the environments that it is not needed.
8
 
* @module yql
9
 
* @submodule yql-jsonp
10
 
*/
11
 
 
12
 
//Over writes Y.YQLRequest._send to use IO instead of JSONP
13
 
Y.YQLRequest.prototype._send = function (url, o) {
14
 
    if (o.allowCache !== false) {
15
 
        o.allowCache = true;
16
 
    }
17
 
    if (!this._jsonp) {
18
 
        this._jsonp = Y.jsonp(url, o);
19
 
    } else {
20
 
        this._jsonp.url = url;
21
 
        if (o.on && o.on.success) {
22
 
            this._jsonp._config.on.success = o.on.success;
23
 
        }
24
 
        this._jsonp.send();
25
 
    }
26
 
};
27
 
 
28
 
 
29
 
 
30
 
}, '3.9.1', {"requires": ["jsonp", "jsonp-url"]});