Skip to content

Instantly share code, notes, and snippets.

@fflorent
Created April 27, 2013 21:29
Show Gist options
  • Save fflorent/5474810 to your computer and use it in GitHub Desktop.
Save fflorent/5474810 to your computer and use it in GitHub Desktop.
A meta-proxy to debug __exposedProps__ (mozilla-specific) ... brrrrr
// (sure, just for debugging!)
var target = {};
target.__exposedProps__ = new Proxy(Object.freeze({}),
new Proxy({
get: function()
{
return "rw";
},
getOwnPropertyDescriptor: function()
{
return Object.getOwnPropertyDescriptor(commandConsole.__exposedProps__, "log");
},
hasOwn: function()
{
return true;
},
has: function()
{
return true;
}
}, {
get: function(target, name)
{
Firebug.Console.log(name);
return target[name];
}
})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment