Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python to js is error.help me #1546

Open
itmeicn opened this issue Dec 15, 2024 · 0 comments
Open

python to js is error.help me #1546

itmeicn opened this issue Dec 15, 2024 · 0 comments

Comments

@itmeicn
Copy link

itmeicn commented Dec 15, 2024

class Jsapi():
    def getWordSendMarkdown(self):
        response['message']['content']='1111111111'
        window.evaluate_js(f"py2js_demo('{response['message']['content']}')")
 window = webview.create_window('测试', './dist/index.html', width=default_W_h[0], height=default_W_h[1],
                                 frameless=True, easy_drag=False, js_api=Jsapi())
  webview.start(debug=True)
//vue3 code
onMounted(() => {
  window["py2js_demo"] = res => {
    console.log("js", res);
  };
});

Python calls JS and can execute it. I tested various writing methods. None of them were successful. GPT doesn't have an answer either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant