File size: 805 Bytes
2a87a37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 *