src/lib/assetsLoader.js
function() {
    var xhr = new XMLHttpRequest();
    var url = assetsBaseUrl + assetsRelativeUrl['images'];

    // @todo Remove the sync call and use a callback
    xhr.open('GET', url);

    xhr.onload = () => {
      var data = JSON.parse(xhr.responseText);
      this.images = data.images;
      this.images.forEach(image => {
        image.fullPath = assetsBaseUrl + data.basepath.images + image.path;
        image.fullThumbPath =
          assetsBaseUrl + data.basepath.images_thumbnails + image.thumbnail;
      });
      Events.emit('assetsimagesload', this.images);
    };
    xhr.onerror = () => {
      console.error('Error loading registry file.');
    };
    xhr.send();

    this.hasLoaded = true;
  }
function() {
    var xhr = new XMLHttpRequest();
    var url = assetsBaseUrl + assetsRelativeUrl['images'];

    // @todo Remove the sync call and use a callback
    xhr.open('GET', url);

    xhr.onload = () => {
      var data = JSON.parse(xhr.responseText);
      this.images = data.images;
      this.images.forEach(image => {
        image.fullPath = assetsBaseUrl + data.basepath.images + image.path;
        image.fullThumbPath =
          assetsBaseUrl + data.basepath.images_thumbnails + image.thumbnail;
      });
      Events.emit('assetsimagesload', this.images);
    };
    xhr.onerror = () => {
      console.error('Error loading registry file.');
    };
    xhr.send();

    this.hasLoaded = true;
  }
function ( ) { var xhr = new XMLHttpRequest ( ) ; var url = assetsBaseUrl + assetsRelativeUrl [ 'images' ] ; // @todo Remove the sync call and use a callback xhr . open ( 'GET' , url ) ; xhr . onload = ( ) => { var data = JSON . parse ( xhr . responseText ) ; this . images = data . images ; this . images . forEach ( image => { image . fullPath = assetsBaseUrl + data . basepath . images + image . path ; image . fullThumbPath = assetsBaseUrl + data . basepath . images_thumbnails + image . thumbnail ; } ) ; Events . emit ( 'assetsimagesload' , this . images ) ; } ; xhr . onerror = ( ) => { console . error ( 'Error loading registry file.' ) ; } ; xhr . send ( ) ; this . hasLoaded = true ; }
XHR the assets JSON.
XHR the assets JSON .