JI-1352 Add event when h5p has finished initializing
This is useful if you want to hook into H5P functionality after the init function has run, e.g. 'resize' event in instancespull/68/head 1.24
parent
159f83f1b8
commit
9a658ba387
|
@ -369,6 +369,10 @@ H5P.init = function (target) {
|
|||
$element.on('mousedown keydown keyup', function (event) {
|
||||
$element.toggleClass('using-mouse', event.type === 'mousedown');
|
||||
});
|
||||
|
||||
if (H5P.externalDispatcher) {
|
||||
H5P.externalDispatcher.trigger('initialized');
|
||||
}
|
||||
});
|
||||
|
||||
// Insert H5Ps that should be in iframes.
|
||||
|
|
Loading…
Reference in New Issue