Skip to content

beforeunload event not triggering on open()'ed windows #4061

Answered by flumm
flumm asked this question in Q&A
Discussion options

You must be logged in to vote

ok I found out what the issue is, one has to wait for the page to load before one can set the beforeunload event.

if i do it in javascript all at once (so not by hand like previously) it also does not work, what i have to do is to wait for the load event to finish:

let foo: Window = window()                                  
    .unwrap()                                               
    .open_with_url_and_target_and_features(                 
        "http://localhost:8080/",                           
        "_blank",                                           
        "popup=true",                                       
    )                                                       
    .u…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@flumm
Comment options

@flumm
Comment options

Answer selected by flumm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #4059 on August 10, 2024 21:42.