- Update
constructorto receive arguments directly- Implemented in this PR, just needs review and merge
- Probably could be simplified in Ember 3, we can remove multi-object
create
- Update concatenated and merged properties in RFC
- Concatenated and merged properties will not be able to work the way they used to.
- No way to know the value of a field before an instance is created
- Parent class constructor finishes before child constructor, so no way to get value in
makeCtorbase constructor
- Fix native getters/setters (make mandatory setter aware of them)
applyMixin,watchKey, anddefinePropertyerase native getters and setterswatchKeyanddefinePropertyonly erase them in development mode, when adding mandatory setter- Normally not a problem because
applyMixingets rid of them anyways, but can't do this for ES classes - Could cause heisenbugs, difficult to track because must observe to change behavior, and won't change at all in production
- Fix
proto- Currently
protogets called once permakeCtorbase constructor - Does not get called for new classes because
wasAppliedis a closure var - needs to be moved tometafor the class protocollapsing needs to be made aware of the prototype chain, not just mixins for the class
- Currently
- Fix
constructorchainthis._super()andsuperappear to work just fine in normal methods- when doing
.extend()native class constructors never called makeCtorconstructor doesn't call super, but probably can be made to conditionally- What should the execution order of the following be?
let Foo = Ember.Object.extend({
init() {
this._super(...arguments);
console.log('Foo');
}
});
class Bar extends Foo {
constructor() {
super(...arguments);
console.log('Bar');
}
}
let Baz = Bar.extend({
init() {
this._super(...arguments);
console.log('Baz');
}
});
Baz.create();
// Foo - init
// Baz - init
// Bar - constructor
// OR
// Foo - init
// Bar - constructor
// Baz - init