HFP-1942 Add crossorigin api call.

Update minor version of core since interface changes
pull/52/head
thomasmars 2018-06-01 11:09:45 +02:00
parent 942a083afa
commit 3ce0adf418
2 changed files with 11 additions and 1 deletions

View File

@ -1773,7 +1773,7 @@ class H5PCore {
public static $coreApi = array(
'majorVersion' => 1,
'minorVersion' => 15
'minorVersion' => 16
);
public static $styles = array(
'styles/h5p.css',

View File

@ -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.
*