WordPress.org

Support

Support » Plugins and Hacks » Continue javascript execution when errors occurs

Continue javascript execution when errors occurs

  • I use the WP native function wp_enqueue_script() for all my JavaScripts loading both in WP front and back-end so it can handle duplicated calls to the same script and so on.

    One of the issues is that others programmers don’t use this function and load their scripts directly from their code, which causes jQuery or jQuery-UI being loaded twice, leading to a bunch of errors.

    The other issue is that code not owned by my triggers an error and stops the execution of the JavaScript beyond this point.

    In short:

    1. A javascript error occurs in code not owned by me.
    2. My code don’t executes due to that f*%@ error.
    3. I want that my code bypass that error and still executes.

    There is a way to handle these issues?

  • The topic ‘Continue javascript execution when errors occurs’ is closed to new replies.