I wonder if you can call a setter from a prototype.
Consider the following class:
class someControl {
constructor() {
this.name = "";
}
get getFunc() {
return this.name
}
set setFunc(value) {
this.name = value;
}
}
class someControl2 {
constructor() {
this.name = "";
}
}
const a = new someControl();
const b = new someControl2();
a.setFunc = "2";
console.log(a.getFunc);
Is there a way you can apply/use the setter from someControl on someControl2 without extending the class someControl2?