load method

dynamic load(
  1. dynamic url,
  2. Function onLoad, [
  3. Function? onProgress,
  4. Function? onError,
])
override

Implementation

load(url, onLoad, [onProgress, onError]) {
  var scope = this;

  var loader = new FileLoader(this.manager);
  loader.setPath(this.path);
  loader.setRequestHeader(this.requestHeader);
  loader.setWithCredentials(this.withCredentials);
  loader.load(url, (text) async {
    // try {

    onLoad(await scope.parse(text));

    // } catch ( e ) {

    // 	if ( onError != null ) {

    // 		onError( e );

    // 	} else {

    // 		print( e );

    // 	}

    // 	scope.manager.itemError( url );

    // }
  }, onProgress, onError);
}