ChessCommanderFlet / flet.pyi
Danisz's picture
Separate flet extensions and add type hint
2a87a37
Raw History Blame Contribute Delete
805 Bytes
from flet_core.page import Page as OriginalPage
class Page(OriginalPage):
def eval_js(self, js_code: str) -> str:
"""
Evaluates JavaScript code in the context of the current page.
This method allows execution of arbitrary JavaScript code within the
page's environment and returns the result as a string.
Args:
js_code (str): The JavaScript code to be executed.
Returns:
str: The result of the JavaScript execution as a string.
Raises:
Exception: If there's an error during JavaScript execution.
Example:
result = page.eval_js("return document.title;")
"""
...
# Re-export other types from flet to maintain compatibility
from flet import *
from flet_runtime import *