In practice we've found that we rarely use the "new Loader(hooks)` option and 
instead this is more common:

var loader = new Loader();
var loaderFetch = loader.fetch.bind(loader);

loader.fetch = function (loadRecord) {
  // do something
  return loaderFetch(loadRecord);
};

This way we can think of each modification to the loader in isolation and we 
can use the same code to modify a custom loader instance and to modify the 
System instance.


-Juan
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to