postinitialize() {
        super.postinitialize();

        if (this.width === undefined ||
            this.width === null ||
            Number.isNaN(this.width) ||
            this.width <= 0 ||
            this.height === undefined ||
            this.height === null ||
            Number.isNaN(this.height) ||
            this.height <= 0) {
            throw ('Invalid dimensions: w=' + this.width + ' h=' + this.height);
        }

        this.updateDimensions();
    }
// Derived classes MUST set the width and height BEFORE postinitialize is called.
Derived classes MUST set the width and height BEFORE postinitialize is called.
Derived classes MUST set the width and height BEFORE postinitialize is called .
postinitialize() {
        super.postinitialize();
        if (this.width === undefined ||
            this.width === null ||
            Number.isNaN(this.width) ||
            this.width <= 0 ||
            this.height === undefined ||
            this.height === null ||
            Number.isNaN(this.height) ||
            this.height <= 0) {
            throw ('Invalid dimensions: w=' + this.width + ' h=' + this.height);
        }
        this.updateDimensions();
    }
postinitialize ( ) { super . postinitialize ( ) ; if ( this . width === undefined || this . width === null || Number . isNaN ( this . width ) || this . width <= 0 || this . height === undefined || this . height === null || Number . isNaN ( this . height ) || this . height <= 0 ) { throw ( 'Invalid dimensions: w=' + this . width + ' h=' + this . height ) ; } this . updateDimensions ( ) ; }
Derived classes MUST set the width and height BEFORE postinitialize is called.
Derived classes MUST set the width and height BEFORE postinitialize is called .