pull/30/merge
Pål Jørgensen 2021-07-05 18:07:53 +02:00 committed by GitHub
commit 4eedac402f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -323,6 +323,13 @@ H5P.init = function (target) {
H5P.trigger(instance, 'resize');
});
// Forward xAPI events to parent window, making it possible to use the
// following code from parent window to get events:
// window.addEventListener('message', function (event) { <...> });
H5P.externalDispatcher.on('xAPI', function (event) {
H5P.communicator.send('xAPI', event.data);
});
H5P.on(instance, 'resize', function () {
if (H5P.isFullscreen) {
return; // Skip iframe resize