MZ The drawFace method is not executed until a 2nd pass

Forgive my doubt, but I have been searching and I can't find what could cause the problem.

I have created a window class that inherits from Windows_Base, I am interested in drawing the faces of the characters.

The problem is that the drawFace method will not be executed until the 2nd execution of the code. I understand that there must be something strange in the update method.

so I've tried forcing an update() right after adding the faces, but this doesn't solve anything. And until you close and reopen the window, the drawing of the face will still not appear.

What could be happening?

The window code is:
JavaScript:
//classes
  class MonsterWindow extends Window_Base {
    
    constructor(...args) {
        super(...args)
        this.makeTable()
        

    };

    
    makeTable() {
      this.drawFace("Actor1",1,10,120,200,200)
    };

    update() {
      this.updateTone();
      this.updateOpen();
      this.updateClose();
      this.updateBackgroundDimmer();
      if (Input.isTriggered("tab")){
        this.close()
      }
    };

And the function that creates the window
HTML:
function makeWindow(){
    
    var myWindow = new MonsterWindow(new Rectangle(10,10,400,300))
 
 
    var scene = SceneManager._scene
    scene.addChild(myWindow)
 
    
}
The first result for Googling "rpg maker drawface":

You need to use the ImageManager to cache the image.
The first result for Googling "rpg maker drawface":

You need to use the ImageManager to cache the image.
It's going to sound really stupid, but I've tried this before, and it didn't work

And strangely enough it still doesn't work.

It doesn't matter if I put it as soon as the plugin loads, inside the class, in a function inside the class, in the external function that creates the object, it won't matter.

The way I found to make it work is to simply put it in a console.log(ImageManager.loadFace("Actor1")) Strangely that will make it work and the image will load the first time
Typically you can just do ImageManager.loadFace in the constructor of your game window, for each applicable face. The scene won't start while the ImageManager is busy, so this is ideal for faces drawn in windows added during a scene's create method. This approach is used in the loadFaceImages method of Window_StatusBase (rmmz_windows.js).

Alternatively you can use Bitmap#addLoadListener on each applicable face image. This approach is used in the preparePartyRefresh method of Window_BattleStatus (rmmz_windows.js).
Typically you can just do ImageManager.loadFace in the constructor of your game window, for each applicable face. The scene won't start while the ImageManager is busy, so this is ideal for faces drawn in windows added during a scene's create method. This approach is used in the loadFaceImages method of Window_StatusBase (rmmz_windows.js).

Alternatively you can use Bitmap#addLoadListener on each applicable face image. This approach is used in the preparePartyRefresh method of Window_BattleStatus (rmmz_windows.js).
Thank you very much for your help, the addLoadListener was the best solution

Original thread: https://forums.rpgmakerweb.com/threads/the-drawface-method-is-not-executed-until-a-2nd-pass.162936/