it seems that I'm in a bad situation here.
I'm using a javascript library and I need to augment a property inside a class but it seems that it can't be done because the property definition does not set configurabe:
to true
.
Here is the library code:
Object.defineProperty(PIXI.DisplayObjectContainer.prototype, 'width', {
// no configurable: true
get: function () { ... },
set: function (value) { ... }
});
My attempt is override this code with something really similar, but when I try do run it, this error happen:
Uncaught TypeError: Cannot redefine property: width
at Function.defineProperties (<anonymous>)
My question is: is that a way to force this override? I know this is not beautiful at all but we REALLY run out of options here.