WordPress.org

Ready to get started?Download WordPress

Forums

Continue javascript execution when errors occurs (1 post)

  1. diosney
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic