2

As we know we create a proxy like this.

var proxy = new Proxy(target, handler);

I however want to get a new proxy object by simply calling a function

var proxy = CreateAProxy(target,handler);

basically without using the new keyword. How do i proceed in spidermonkey for achieving this.

gCoder12
  • 1,643
  • 2
  • 10
  • 5
  • Come on guys i just need a general guideline in 4-5 sentences on how to proceed nothing more. – gCoder12 Oct 31 '15 at 15:48
  • Stackoverflow for spidermonkey is not active. Your best bet is the irc channel #jsapi on moz irc channels. Here is mibbit, an html5 client: https://client00.chat.mibbit.com/?url=irc%3A%2F%2Firc.mozilla.org%2F%23jsapi Another place you can try is http://ask.mozilla.org/ – Noitidart Nov 01 '15 at 09:04
  • @Noitidart Have already tried there haven't got an answer. – gCoder12 Nov 01 '15 at 21:31

1 Answers1

0

This calls for this answer:

function CreateAProxy(target, handler) {
  return new Proxy(target, handler);
}

In other words, I don't think you've explained what exactly you need and why.

Nickolay
  • 31,095
  • 13
  • 107
  • 185