Closed anthony-redFox closed 6 years ago
are you sure you are following instructions? https://github.com/WebReflection/document-register-element#upgrading-the-constructor-context
just to be clear, Reflect.construct does not pass the context neither: https://github.com/WebReflection/babel-plugin-transform-builtin-classes/blob/master/src/index.js#L9-L15
Closing this as the null context is on purpose. The constructor is bound, the new instance is created.
@WebReflection Thanks a lot!
In the line
return sPO(new Constructor, Class.prototype);
Constructor doesn't have "this" context as Class.prototype and that why document-register-element can't get constructor from "this" statement.
The different with Reflect in the context of call
new Constructor