BVB Source Codes

PreloadJS Show XMLLoader.js Source code

Return Download PreloadJS: download XMLLoader.js Source code - Download PreloadJS Source code - Type:.js
  1. /*
  2.  * XMLLoader
  3.  * Visit http://createjs.com/ for documentation, updates and examples.
  4.  *
  5.  *
  6.  * Copyright (c) 2012 gskinner.com, inc.
  7.  *
  8.  * Permission is hereby granted, free of charge, to any person
  9.  * obtaining a copy of this software and associated documentation
  10.  * files (the "Software"), to deal in the Software without
  11.  * restriction, including without limitation the rights to use,
  12.  * copy, modify, merge, publish, distribute, sublicense, and/or sell
  13.  * copies of the Software, and to permit persons to whom the
  14.  * Software is furnished to do so, subject to the following
  15.  * conditions:
  16.  *
  17.  * The above copyright notice and this permission notice shall be
  18.  * included in all copies or substantial portions of the Software.
  19.  *
  20.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21.  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  22.  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  23.  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  24.  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  25.  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  26.  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  27.  * OTHER DEALINGS IN THE SOFTWARE.
  28.  */
  29.  
  30. /**
  31.  * @module PreloadJS
  32.  */
  33.  
  34. // namespace:
  35. this.createjs = this.createjs || {};
  36.  
  37. (function () {
  38.         "use strict";
  39.  
  40.         // constructor
  41.         /**
  42.          * A loader for CSS files.
  43.          * @class XMLLoader
  44.          * @param {LoadItem|Object} loadItem
  45.          * @extends AbstractLoader
  46.          * @constructor
  47.          */
  48.         function XMLLoader(loadItem) {
  49.                 this.AbstractLoader_constructor(loadItem, true, createjs.AbstractLoader.XML);
  50.  
  51.                 // public properties
  52.                 this.resultFormatter = this._formatResult;
  53.         };
  54.  
  55.         var p = createjs.extend(XMLLoader, createjs.AbstractLoader);
  56.         var s = XMLLoader;
  57.  
  58.         // static methods
  59.         /**
  60.          * Determines if the loader can load a specific item. This loader can only load items that are of type
  61.          * {{#crossLink "AbstractLoader/XML:property"}}{{/crossLink}}.
  62.          * @method canLoadItem
  63.          * @param {LoadItem|Object} item The LoadItem that a LoadQueue is trying to load.
  64.          * @returns {Boolean} Whether the loader can load the item.
  65.          * @static
  66.          */
  67.         s.canLoadItem = function (item) {
  68.                 return item.type == createjs.AbstractLoader.XML;
  69.         };
  70.  
  71.         // protected methods
  72.         /**
  73.          * The result formatter for XML files.
  74.          * @method _formatResult
  75.          * @param {AbstractLoader} loader
  76.          * @returns {XMLDocument}
  77.          * @private
  78.          */
  79.         p._formatResult = function (loader) {
  80.                 return createjs.DataUtils.parseXML(loader.getResult(true));
  81.         };
  82.  
  83.         createjs.XMLLoader = createjs.promote(XMLLoader, "AbstractLoader");
  84.  
  85. }());
  86.  
downloadXMLLoader.js Source code - Download PreloadJS Source code
Related Source Codes/Software:
gotraining - Go Training Class Material : ... 2017-04-29
eigen - The Art World in Your Pocket or Your Trendy Tech C... 2017-04-29
rack-cors - Rack Middleware for handling Cross-Origin Resource... 2017-04-29
react-redux-tutorial - react-redux-tutorial in Chinese, catalog &&... 2017-04-29
swifter - Tiny http server engine written in Swift programmi... 2017-04-29
boto3 - AWS SDK for Python http://a... 2017-04-30
Fluidbox - Replicating and improving the lightbox module seen... 2017-04-30
jo - JSON output from a shell 2017-04-30
qTip2 - qTip2 - Pretty powerful tooltips ... 2017-04-30
swing - A swipeable cards interface. The swipe-left/swipe-... 2017-04-30
growth - Growth - App to help you Be Awesome Developer &... 2017-05-06
TourGuide - TourGuide is an Android library that aims to provi... 2017-05-06
urh - Universal Radio Hacker: investigate wireless proto... 2017-05-06
Gutenberg - A meaningful web typography starter kit. 2017-05-06
NiftyDialogEffects - Nifty Modal Dialog Effect 2017-05-06
opengapps - The main repository of the Open GApps Project ... 2017-05-06
The micro CMS network asked administration system (the original PHP168 S series) v20161230 - 1, upgraded the mobile version. 2, upgrade the st... 2017-05-06
The news industry marketing website HTML 5 v5.7 site source code - Dedecms latest version of kernel development and o... 2017-05-06
Dream weaving white large entrepreneurial wealth information class site template v1.0 - Dream white large entrepreneurial wealth of inform... 2017-05-06

 Back to top