17 lines
230 B
JavaScript
17 lines
230 B
JavaScript
var Test = function() {
|
|
function Test() {}
|
|
|
|
Object.defineProperties(Test.prototype, {
|
|
bar: {
|
|
get: function() {
|
|
throw new Error("wow");
|
|
}
|
|
}
|
|
});
|
|
|
|
return Test;
|
|
}();
|
|
|
|
var test = new Test;
|
|
test.bar;
|