async fixes by Ward, Nick, and Paul#348
Conversation
|
Any other plugin expecting callbacks will be warned.
I'm unsure how Method synchronized. We did test that the bottles of beer computation still works. |
| script.emit(div, item) | ||
| done() | ||
| } | ||
| $('.retry').on('click', async function () { |
There was a problem hiding this comment.
This is maybe not that important, but I think both the close and retry handlers would be improved by providing the dialog element as context like so:
$('.close', dialog).on('click', ...)
$('retry', dialog).on('click', ...) I think this would only matter if there were multiple errors showing in a lineup, which is probably uncommon.
There was a problem hiding this comment.
I'm unable to find any jQuery documentation that explains what this second parameter is or means. This is as close as I come but this isn't what is being suggested here, I think.
https://api.jquery.com/context/
How would this second parameter be used? Are there further modifications required to make it work?
Thanks. Sorry to be so slow responding.
There was a problem hiding this comment.
$('.close').on('click', ...) adds a click handler that applies to every element in the entire document with the close class. By specifying the second parameter it reduces the scope from document to just the specific dialog element.
There was a problem hiding this comment.
Because we don't have many place in the code where retry or close classes are added, this is a pretty minor issue, I think.

We also deprecate callback on emit which exists only in the Method plugin which Ward will upgrade.