pipwerks / scorm-api-wrapper

The pipwerks SCORM API Wrapper
http://pipwerks.com
357 stars 125 forks source link

Fix for IE window.top.opener #8

Closed jheinstein closed 9 years ago

jheinstein commented 10 years ago

On line 186 the following code can produce an Access Denied error in IE11:

if(!API && win.top.opener && win.top.opener.document) {

The error occurs when win.top is null--trying to access the opener object of a null object.

The solution is to add a check for win.top, i.e.:

if(!API && win.top && win.top.opener && win.top.opener.document) {

pipwerks commented 9 years ago

Fixed. Thanks