From 579ba96b49831450bc422f87e934f2b8e002911f Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 1 Jun 2018 11:09:45 +0200 Subject: [PATCH] HFP-1942 Add crossorigin api call. Update minor version of core since interface changes --- h5p.classes.php | 2 +- js/h5p.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 310de97..2efebbd 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1773,7 +1773,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.js b/js/h5p.js index 1b899d3..ef56834 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1938,6 +1938,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. *