Title: Javascript error: cannot read properties of undefined (reading &#8216;trigger&#8217;)
Last modified: July 13, 2022

---

# Javascript error: cannot read properties of undefined (reading ‘trigger’)

 *  [Arun](https://wordpress.org/support/users/arunu1996/)
 * (@arunu1996)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-error-cannot-read-properties-of-undefined-reading-trigger/)
 * Hi,
    Faced the following Javascript error:**cannot read properties of undefined(
   reading ‘trigger’) in h5p.js?ver=1.15.4 line: 2810** while refreshing the page.
   The issue was not consistent. The issue appeared at times not during the initial
   load but while refreshing.
 * As a temporary fix I had modified the Javascript file and wrapped the line 2810
   with an if condition
 *     ```
       if(window.parent.H5P.externalDispatcher){
           window.parent.H5P.externalDispatcher.trigger.call(this, event);
       }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Arun](https://wordpress.org/support/users/arunu1996/)
 * (@arunu1996)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/javascript-error-cannot-read-properties-of-undefined-reading-trigger/#post-15822529)
 * Due to this error the H5P interactive video was not loading. The video content
   inside the iframe was empty.
 *  Plugin Author [icc0rz](https://wordpress.org/support/users/icc0rz/)
 * (@icc0rz)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-cannot-read-properties-of-undefined-reading-trigger/#post-15823720)
 * Most likely the theme or another plugin has altered the order of which the JavaScript
   files are loaded. Dependencies needs to be loaded first, i.e. the same order 
   as a vanilla WordPress site with H5P uses.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Javascript error: cannot read properties of undefined (reading ‘trigger’)’
is closed to new replies.

 * ![](https://ps.w.org/h5p/assets/icon.svg?rev=986118)
 * [Interactive Content – H5P](https://wordpress.org/plugins/h5p/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/h5p/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/h5p/)
 * [Active Topics](https://wordpress.org/support/plugin/h5p/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/h5p/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/h5p/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [icc0rz](https://wordpress.org/support/users/icc0rz/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/javascript-error-cannot-read-properties-of-undefined-reading-trigger/#post-15823720)
 * Status: not resolved