diff --git a/h5p.classes.php b/h5p.classes.php index 47258ef..09f15ed 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1797,7 +1797,7 @@ class H5PCore { public static $coreApi = array( 'majorVersion' => 1, - 'minorVersion' => 15 + 'minorVersion' => 16 ); public static $styles = array( 'styles/h5p.css', diff --git a/js/h5p-event-dispatcher.js b/js/h5p-event-dispatcher.js index 592e8cf..a6707b4 100644 --- a/js/h5p-event-dispatcher.js +++ b/js/h5p-event-dispatcher.js @@ -1,4 +1,4 @@ -var H5P = H5P || {}; +var H5P = window.H5P = window.H5P || {}; /** * The Event class for the EventDispatcher. diff --git a/js/h5p-x-api-event.js b/js/h5p-x-api-event.js index e5d6368..c1d6c66 100644 --- a/js/h5p-x-api-event.js +++ b/js/h5p-x-api-event.js @@ -1,4 +1,4 @@ -var H5P = H5P || {}; +var H5P = window.H5P = window.H5P || {}; /** * Used for xAPI events. diff --git a/js/h5p-x-api.js b/js/h5p-x-api.js index 1cf8b74..8a27eb9 100644 --- a/js/h5p-x-api.js +++ b/js/h5p-x-api.js @@ -1,4 +1,4 @@ -var H5P = H5P || {}; +var H5P = window.H5P = window.H5P || {}; /** * The external event dispatcher. Others, outside of H5P may register and diff --git a/js/h5p.js b/js/h5p.js index 6d63259..631836d 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -2,7 +2,7 @@ // TODO: Should we split up the generic parts needed by the editor(and others), and the parts needed to "run" H5Ps? /** @namespace */ -var H5P = H5P || {}; +var H5P = window.H5P = window.H5P || {}; /** * Tells us if we're inside of an iframe. @@ -2012,6 +2012,16 @@ H5P.createTitle = function (rawTitle, maxLength) { } }; + /** + * Get crossorigin option that is set for site. Usefull for setting crossorigin policy for elements. + * + * @returns {string|null} Returns the string that should be set as crossorigin policy for elements or null if + * no policy is set. + */ + H5P.getCrossOrigin = function () { + return H5PIntegration.crossorigin ? H5PIntegration.crossorigin : null; + }; + /** * Async error handling. * diff --git a/js/jquery.js b/js/jquery.js index d821060..90a3b83 100644 --- a/js/jquery.js +++ b/js/jquery.js @@ -5,7 +5,7 @@ return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,a // Snap this specific version of jQuery into H5P. jQuery.noConflict will // revert the globals to what they were before this file was loaded. -var H5P = H5P || {}; +var H5P = window.H5P = window.H5P || {}; /** * jQuery v1.9.1