Chrome uses a bizarre JS parameter form for chrome.extension.connect. It tests the type of parameters for string/object to allow you to omit them entirely: http://src.chromium.org/viewvc...
Doesn't this kind of parameter sniffing make you kind of nauseous? I know that's considered "normal" in javascript, but god it gives me the willies.
- Joel Webber
Yeah, I'm not really a fan of it, since it fails in mysterious ways. Most of the parameters are tested using typeof "blah" == "string" or "object". Of course, typeof null == "object", but none of the checks actually look for that. You have to use function.apply to call it from GWT to make sure you don't throw in a null.
- Matt Mastracci