Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Parameter number conflict.

$
0
0
Perhaps something like this:
engine.AddHostObject("$", new DollarSignFunc((arg1, arg2) => {
    var name = arg1 asstring;
    if (name == null)
        new Window(f).AddEventHandler("Load", arg1);
    elseif (arg2 != null)
        new Window(f).AddEventHandler(name, arg2);
    else {
        // add code here
    }
}));
As long as the calling pattern can be inferred from the arguments, you can support as many as you need.

Cheers!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>