The "$wnd.Lightstreamer." prefix have to be added every time you instantiate the "Subscription" class (just as for any other class of the library).