2323use Boson \Poller \PollerInterface ;
2424use Boson \Shared \Marker \BlockingOperation ;
2525use Boson \Shared \Marker \RequiresDealloc ;
26+ use Boson \WebView \Manager \WebViewManager ;
2627use Boson \WebView \WebView ;
2728use Boson \Window \Event \WindowClosed ;
2829use Boson \Window \Manager \WindowManager ;
@@ -75,11 +76,8 @@ class Application implements
7576 public readonly WindowManager $ windows ;
7677
7778 /**
78- * Provides more convenient and faster access to the
79- * {@see WindowManager::$default} subsystem from
80- * child {@see $windows} property.
81- *
82- * @uses WindowManager::$default Default (first) window of the windows list
79+ * Provides more convenient and faster access to the {@see WindowManager::$default}
80+ * subsystem from child {@see $windows} property.
8381 *
8482 * @api
8583 */
@@ -94,12 +92,26 @@ class Application implements
9492 ?? throw NoDefaultWindowException::becauseNoDefaultWindow ();
9593 }
9694
95+ /**
96+ * Provides more convenient and faster access to the {@see Window::$webviews}
97+ * subsystem from child {@see $window} property.
98+ *
99+ * @api
100+ */
101+ public WebViewManager $ webviews {
102+ /**
103+ * Gets the webview manager of the default application window.
104+ *
105+ * @throws NoDefaultWindowException in case the default window was
106+ * already closed and removed earlier
107+ */
108+ get => $ this ->window ->webviews ;
109+ }
110+
97111 /**
98112 * Provides more convenient and faster access to the {@see Window::$webview}
99113 * subsystem from {@see $window} property.
100114 *
101- * @uses Window::$webview The webview of the default (first) window
102- *
103115 * @api
104116 */
105117 public WebView $ webview {
@@ -500,6 +512,12 @@ public function quit(): void
500512 */
501513 public function __destruct ()
502514 {
515+ $ this ->quit ();
516+
517+ $ this ->windows ->destroy ();
518+ $ this ->extensions ->destroy ();
519+
520+ var_dump (__METHOD__ );
503521 $ this ->saucer ->saucer_application_quit ($ this ->id ->ptr );
504522 }
505523
0 commit comments