The preferred way to access the LightstreamerEngine object from a Push-page is through the onEngineReady() event handler callback of the PushPage object. You will be passed a reference to the LightstreamerEngine object (that you can save for subsequent uses) as soon as it is ready. A typical implementation could be the following:
Code javascript:
  1. var e; //LightstreamerEngine object reference
  2. var p = new PushPage();
  3. p.onEngineReady = function(engine) { e = engine }
  4. p.bind();
  5. // one on the possible ways of setting the engine
  6. p.loadEngine(“lsengine.html?config=lsengine_config.js);
  7.    // first alternative way
  8.    // p.loadEngineMinimal(“lsengine.html”, “MyEngine”);
  9.    // second alternative way   
  10.    // p.setEngineReference(parent.frames[“MY_ENGINE_FRAME”]);
  11.    // third alternative way
  12.    // p.setEngineReference(null, “MyEngine”);
The result is that the variable “e” of the Push-page will contain a reference to the LightstreamerEngine object only when the engine is actually ready.