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

New Post: invoking js callback with params argument

$
0
0
hi,

i want to invoke an js callback from c# with unknown arguments count

example:
public void Fire(string name, params object[]args)
        {
            if (_listeners.ContainsKey(name))
            {
                foreach (var l in _listeners[name])
                {
                    l(args);
                }
            }
        }
but the expected 2. argument in js is undefined

Viewing all articles
Browse latest Browse all 2297

Trending Articles



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