0

Hello I am a noob to famo.us and would like to be notified for events like on window load using the famo.us package

the only way I currently get this functionality, is like this:

Engine.on('postrender', function(e){
    console.log('postrendder');
});

I could get this by looking at the events emitted by Engine.js in the core package.

The problem I have is this event is emitted for at the FPS of engine which is > 60fps. In other words this event is raised not on window load but as long as the page is alive at >60fps.

How can I get a window load event ?

UPDATE:

link here shows that you can register for DOM events but when I register for onload or loaded they are not fired.

This can be tested here : test

Community
  • 1
  • 1
Pavan K
  • 4,085
  • 8
  • 41
  • 72

1 Answers1

0

I think @Stephen is right. the onload is being fired before main.js invocation. I used this workaround for now.

image.on('deploy', function() {
    console.log('post deploy');
});

I tied it to a deploy event for a surface.

Pavan K
  • 4,085
  • 8
  • 41
  • 72