xAPIWrapper
xAPIWrapper copied to clipboard
Feature request: Make `getQueryVariable` iframe aware or at least allow to pass launch parameters to `launch` explicitly
The current implementation of ADL.launch
uses getQueryVariable
[1], which assumes that it will always be able to get the launch parameters from window.location
. This is not true if window
is an iframe, for example for an embedded H5P on a Moodle page.
It would be great if this use case could be supported somehow, perhaps by trying to get launch parameters from the parent iframe (if it exists) as a fallback, or by allowing to override the launch parameters by passing them explicitly.
[1] https://github.com/adlnet/xAPIWrapper/blob/d6637d3e2a63f728d467b97ba111e85410de639c/src/xapi-launch.js#L3