So basicly I'm injecting a script into a frame to get a specific variable but I get the following error: content.exenv2.exerciseframe.singletons is undefined
But when I access this variable thru to firebug console it works. Also I can access other variable from the frame just not the one I need
Full Error
error: dwh: An exception occurred.
TypeError: content.exenv2.exerciseframe.singletons is undefined
resource://jid1-os5kkx1kvkogmq-at-jetpack/dwh/data/inject.js 2
Traceback (most recent call last):
File "resource://jid1-os5kkx1kvkogmq-at-jetpack/dwh/data/inject.js", line 2, i
n
var length = content.exenv2.exerciseframe.singletons.entries["TkExerciseItem
s_()"].length;
First 2 lines of code
var test = content.exenv2.exerciseframe.loadingTimer; //This works
var length = content.exenv2.exerciseframe.singletons.entries["TkExerciseItems_()"].length; //Error