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