Skip to content

Commit 03a8958

Browse files
committed
Amend to look for the API in the current window first. Whilst this isn't usually required, some platforms such as Intuition Rubicon inject the API into the window due to its offline capabilities.
Also, looking in the current window is the first place to try in the original APIWrapper.js from which this was inspired. It is also referenced in the ADL guidelines.
1 parent 7ec212c commit 03a8958

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/JavaScript/SCORM_API_wrapper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ pipwerks.SCORM.API.get = function(){
175175
find = scorm.API.find,
176176
trace = pipwerks.UTILS.trace;
177177

178-
if(win.parent && win.parent != win){
178+
API = find(win);
179+
180+
if(!API && win.parent && win.parent != win){
179181
API = find(win.parent);
180182
}
181183

0 commit comments

Comments
 (0)