@@ -38,7 +38,7 @@ class WebView(ft.ConstrainedControl):
3838 bgcolor : Optional [ft .ColorValue ] = None
3939 """Defines the background color of the WebView."""
4040
41- on_page_started : ft .OptionalControlEventCallable = None
41+ on_page_started : ft .OptionalControlEventHandler [ "WebView" ] = None
4242 """
4343 Fires soon as the first loading process of the webview page is started.
4444
@@ -48,7 +48,7 @@ class WebView(ft.ConstrainedControl):
4848 Works only on the following platforms: iOS, Android and macOS.
4949 """
5050
51- on_page_ended : ft .OptionalControlEventCallable = None
51+ on_page_ended : ft .OptionalControlEventHandler [ "WebView" ] = None
5252 """
5353 Fires when all the webview page loading processes are ended.
5454
@@ -58,7 +58,7 @@ class WebView(ft.ConstrainedControl):
5858 Works only on the following platforms: iOS, Android and macOS.
5959 """
6060
61- on_web_resource_error : ft .OptionalControlEventCallable = None
61+ on_web_resource_error : ft .OptionalControlEventHandler [ "WebView" ] = None
6262 """
6363 Fires when there is error with loading a webview page resource.
6464
@@ -68,7 +68,7 @@ class WebView(ft.ConstrainedControl):
6868 Works only on the following platforms: iOS, Android and macOS.
6969 """
7070
71- on_progress : ft .OptionalControlEventCallable = None
71+ on_progress : ft .OptionalControlEventHandler [ "WebView" ] = None
7272 """
7373 Fires when the progress of the webview page loading is changed.
7474
@@ -78,7 +78,7 @@ class WebView(ft.ConstrainedControl):
7878 Works only on the following platforms: iOS, Android and macOS.
7979 """
8080
81- on_url_change : ft .OptionalControlEventCallable = None
81+ on_url_change : ft .OptionalControlEventHandler [ "WebView" ] = None
8282 """
8383 Fires when the URL of the webview page is changed.
8484
@@ -88,7 +88,7 @@ class WebView(ft.ConstrainedControl):
8888 Works only on the following platforms: iOS, Android and macOS.
8989 """
9090
91- on_scroll : ft .OptionalEventCallable [WebViewScrollEvent ] = None
91+ on_scroll : ft .OptionalEventHandler [WebViewScrollEvent [ "WebView" ] ] = None
9292 """
9393 Fires when the web page's scroll position changes.
9494
@@ -98,7 +98,9 @@ class WebView(ft.ConstrainedControl):
9898 Works only on the following platforms: iOS, Android and macOS.
9999 """
100100
101- on_console_message : ft .OptionalEventCallable [WebViewConsoleMessageEvent ] = None
101+ on_console_message : ft .OptionalEventHandler [
102+ WebViewConsoleMessageEvent ["WebView" ]
103+ ] = None
102104 """
103105 Fires when a log message is written to the JavaScript console.
104106
@@ -108,7 +110,9 @@ class WebView(ft.ConstrainedControl):
108110 Works only on the following platforms: iOS, Android and macOS.
109111 """
110112
111- on_javascript_alert_dialog : ft .OptionalEventCallable [WebViewJavaScriptEvent ] = None
113+ on_javascript_alert_dialog : ft .OptionalEventHandler [
114+ WebViewJavaScriptEvent ["WebView" ]
115+ ] = None
112116 """
113117 Fires when the web page attempts to display a JavaScript alert() dialog.
114118
@@ -362,7 +366,7 @@ def load_request(self, url: str, method: RequestMethod = RequestMethod.GET):
362366
363367 Args:
364368 url (str): The URL to load.
365- method (RequestMethod): The HTTP method to use. Defaults to `RequestMethod.GET`.
369+ method (RequestMethod): The HTTP method to use.
366370 """
367371 self ._check_mobile_or_mac_platform ()
368372 asyncio .create_task (self .load_request_async (url , method ))
@@ -375,7 +379,7 @@ async def load_request_async(
375379
376380 Args:
377381 url (str): The URL to load.
378- method (RequestMethod): The HTTP method to use. Defaults to `RequestMethod.GET`.
382+ method (RequestMethod): The HTTP method to use.
379383
380384 Note:
381385 Works only on the following platforms: iOS, Android and macOS.
0 commit comments