Try
s.A();
A
is
a function. If you just say s.A;
all
you're doing is emitting the reference to what A
is,
e.g. if I whack s.A;
into
Chrome's javaScript console I get the following:
Notice how all it did was output the function definition?
Now, if I say `s.A();' I get what you originally expected - it fires the function: