Unload: update outdated example#639
Conversation
97c6513 to
3f0ff89
Compare
|
I'd also add a note that in Firefox (and maybe in some other places?) a message is ignored. |
I thought about it, but are jQuery API docs the right place to teach people JavaScript? This isn't a jQuery specific behaviour. |
|
We're already making this event special by setting What do you think, @dmethvin? |
There was a problem hiding this comment.
s/alert/message/ maybe?
s/will be/may be/ as well?
|
I believe we've gotten bug reports about this in the past, so perhaps we can add something to the warning already there. |
|
Just for the reference, dropping in jquery/learn.jquery.com#608 too. Might be worth it to mention it there. |
Added a sentence warning about it. I don't think we should go in-depth. @dmethvin What do you think? |
6c3d7a0 to
7240ac0
Compare
|
What about the info that some browsers will ignore the message at all? |
|
I agree the comments here should be kept simple and not go too deep. It's always a bit frustrating when an API reference turns into a big "how to write JavaScript in the browser" article. Fortunately this page is pretty short at this point so we're not adding that much more to read.
This is a great point, maybe move this to the beginning in its own paragraph? That brings up the async operation trap, so perhaps add a sentence after it like, "Note that the browser may cancel or deny asynchronous operations attempted in this handler, such as AJAX or setTimeout."
Maybe something like this instead? "The string you return may be used in a browser confirmation dialog, but not all browsers support this." The warning already covers this ground again so I don't think we need much more. |
|
@dmethvin That sounds good. :) Michał Gołębiowski |
7240ac0 to
df4240a
Compare
df4240a to
b44ca0a
Compare
|
LGTM! |
Would fix #388.