As written, I do not think that I will do something like what you want. You initialize "MyLibrary.MyModule" with basically nothing; there is no return value from this "initialize" function, and you call it as if it had it.
I canβt say what you are trying to do, but:
MyLibrary.MyModule = (function whatever() { })(id, options);
means: "call the function by anyone, using the argument list, consisting of the values ββof the variable" id "and variables" options ", and then set the property" MyModule "to the object referenced by" MyLibrary ", any value is returned from this function call.
When the smoke clears, "MyLibrary.MyModule" will not be a function, as far as I can tell. Perhaps if you explain what you want, it means that someone can help fix it.
Pointy
source share