[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/yuilib/3.17.2/yql-jsonp/ -> yql-jsonp.js (source)

   1  /*
   2  YUI 3.17.2 (build 9c3c78e)
   3  Copyright 2014 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.17.2', {"requires": ["yql", "jsonp", "jsonp-url"]});


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1