CallFunctionArguments - CLR or Javascript types

Jan 18, 2012 at 2:36 PM

If I use CallFunction("MyFunction", "MyStringArg") the it would appear that Marshaller.MarshalClrValue() wraps the argument in an object wrapper.

I am a beginner with Javascript but it seems to me that primitive type passed as arguments should be converted to their javascript equivalent.

I found this issue because the 3rd party javascript library I need to use (which I can't modify) has this code

if ("string" !== typeof style) {
style = "";



 Luckily I am calling another function before this so I can convert it with

style = "" + style;










and since typeof style is returning object is it wiping out my parameter!

As it happens, I my argument is going through a different function before it