How to make the browser minimize when you click the cross (close the window)

how to make it so that when you click the cross (close the window), the browser is minimized, and not turned off. Other applications can do it, how to do it in brava?

Description of the issue:
It is not clear how to enable the window minimization function.

Steps to Reproduce (add as many as necessary): 1. 2. 3.

  1. I press the cross and the window closes.
  2. The application is closed.

Actual Result (gifs and screenshots are welcome!):

Expected result:

Reproduces how often:

Operating System and Brave Version(See the About Brave page in the main menu):
macos big sur 11.3 (20E232)

Additional Information:
I want to make a better application.