System as a SystemLoader class

Guy Bedford guybedford at
Mon Jul 14 10:39:01 PDT 2014

Currently if I want to subclass the System loader I need to do something
like -

var newLoader = new Loader(System);
newLoader.fetch = function() {
  // ...

Effectively we're monkey-patching, which isn't pretty.

It would be nice to be able to do:

class newLoader extends System.constructor {
  constructor(loaderConfig) {
    this.baseURL = loaderConfig.baseURL;
    // ...
  fetch: function() {

In order to allow this, we would need to first define a SystemLoader class,
and make System an instance of it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list