How to execute a function from window.opener that isn't exposed to the window?

geosforce

New Member
I'm currently playing around for fun with building something like Mozilla Persona. I have so far built this:\[code\](function(){ var loginFailedCallback = function(){}; var loginSuccessCallback = function(){}; var MyId = { Request: function(fail, success) { loginFailedCallback = fail; success = loginSuccessCallback; window.open("oauth.html", 'test', "width=650,height=280,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0"); } }; window.MyId = MyId;})();\[/code\]As you can see, I created an object a site owner could use to Request an authentication process from the user. The two callbacks aren't exposed to the global namespace so they can't get triggered by the site owners code (or the console).But there lies the problem: How can I execute those callbacks from my popup? I know I can access the opener window with window.opener. But since the callbackes aren't exposed to the window object, what can I do?
 
Back
Top