_onSourceLoad()
    {
        // if we have no width/height, consider the load a failure.
        this.update(null, true);
        if (!this.width || !this.height)
        {
            this._onSourceError({ message: 'Source failed to load.' });

            return;
        }

        // unbind events related to loading, but keep non-loading related ones.
        this._unbindSourceEvents(true);

        // update
        this.ready = true;
        this.update();

        // since _onSourceLoad can be called synchronously, wait a tick before dispatching.
        setTimeout(() => this.onReady.dispatch(), 0);
    }
/**
     * Called when the underlying source is loaded and ready to be used.
     *
     * @private
     */
Called when the underlying source is loaded and ready to be used.
@private
Called when the underlying source is loaded and ready to be used . @private
_onSourceLoad()
    {
        this.update(null, true);
        if (!this.width || !this.height)
        {
            this._onSourceError({ message: 'Source failed to load.' });
            return;
        }
        this._unbindSourceEvents(true);
        this.ready = true;
        this.update();
        setTimeout(() => this.onReady.dispatch(), 0);
    }
_onSourceLoad ( ) { this . update ( null , true ) ; if ( ! this . width || ! this . height ) { this . _onSourceError ( { message : 'Source failed to load.' } ) ; return ; } this . _unbindSourceEvents ( true ) ; this . ready = true ; this . update ( ) ; setTimeout ( ( ) => this . onReady . dispatch ( ) , 0 ) ; }
Called when the underlying source is loaded and ready to be used.
Called when the underlying source is loaded and ready to be used .
// if we have no width/height, consider the load a failure. // unbind events related to loading, but keep non-loading related ones. // update // since _onSourceLoad can be called synchronously, wait a tick before dispatching.