Hi,
I am trying to write a proxy in a Firebug.MyModel instance to capture all
calls to create foo instances (in the loaded web page)
Sample pseudo-code below
Code Snippet #1
//In Firebug Model (Firebug extension)
var win = context.window.wrappedJSObject;
if (win.foo){
var _proxy = win.foo;
if (_proxy){
win.foo = function(){
_proxy.apply(this, arguments);
};
}
}
}
Code Snippet #2
//In application code of the web page loaded in the browser
win.foo = function(){
this.prop_name = '10';
}
...
...
var x = new win.foo;
//end application code
The proxy-ing happens correctly in the firebug extension, but when
_proxy.apply(this.arguments) is called, I get an error Error: Permission
denied to access property 'prop_name'
Is this because the 'this' pointer (in the proxy block) is in a privileged
(chrome) context (where the proxy-ing is happening)? Or am I doing
something wrong? Any solutions/work-arounds to this problem would be
appreciated.
Thanks for helping
Regards,
Dhruva Ray
--
--
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug
---
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.