I'm developing JS that is used in a web framework, and is frequently mixed in with other developers' (often error-prone) jQuery code. Unfortunately errors in their jQuery(document).ready blocks prevent mine from executing. Take the following simple sample:
Shouldn't the second ready block execute regardless of what happened in the previous? Is there a "safe" way to run jQuery(document).ready that will run even in the case of previous errors?
EDIT: I have no control/visibility over the error-prone blocks as they're written by other authors and mixed in arbitrarily.
以上就是Handling errors in jQuery(document).ready的详细内容，更多请关注web前端其它相关文章！