function onError() {
				// Prevent changing status twice, when XHR.error and XHR.upload.onerror could be called together.
				if ( loader.status == 'error' ) {
					return;
				}

				loader.message = loader.lang.filetools.networkError;
				loader.changeStatus( 'error' );
			}
Attaches listeners to the XML HTTP request object.

@private
@param {XMLHttpRequest} xhr XML HTTP request object.