This repository was archived by the owner on Jul 13, 2020. It is now read-only.
Commit 858c4a5
committed
Implement SystemLoader constructor
This adds a SystemLoader constructor function used internally to inherit
from Loader. `System` then becomes an instance of SystemLoader and
`SystemLoader` is set as `System.constructor`. This way downstream code
can do something like:
```js
class MyLoader extends System.constructor {
fetch() {
}
}
```
And doing so will have access to `super` and the like.
I also added in `esnext` to build this and use es6 classes. We talked
about doing it this way and it is *much* more elegant in my opinion
(just look at the minimal amount of code changes).
Let me know if this adds too much code or you don't like it for some
reason and I'll implement this as regular old constructor functions, but
I thought this turned out really well. Fixes #1991 parent 55177e1 commit 858c4a5
File tree
8 files changed
+1506
-29
lines changed- dist
- lib
- test
- worker
8 files changed
+1506
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
60 | | - | |
61 | 67 | | |
62 | 68 | | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | | - | |
| 72 | + | |
66 | 73 | | |
0 commit comments