Skip to content

window methods do not work in 'loaded' event #528

Description

@bvukotic

Specification

  • pywebview version: 3.2
  • platform / version: Windows 10

Description

My code is:
def on_loaded():
     print("loaded....")
     print(webview.windows[0].get_current_url())

window = webview.create_window('MyApp', "http://127.0.0.1:8000/")
window.loaded += on_loaded
webview.start()

Problem is in
webview.windows[0].get_current_url()
it does not execute. It does not raise exception, it is just stuck there and nothing happens, method 'on_loaded' does not continue. Actually this also happens when I try to call:

webview.windows[0].evaluate_js('... some my javascript....')

I tried to use 'window' instead of webview.windows[0] but result is the same

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions