jsymonkj / pwi

Automatically exported from code.google.com/p/pwi
0 stars 0 forks source link

Return a deferred to know when pwi has done its work #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This should be more an enhancement, but it would be really helpful to know when 
pwi has done all its initialization work and the DOM is ready.  This would 
allow to modify the generated DOM a little bit more (for example remove 
img#video in my case).

If the main function returned a deferred then we could do something like this:

$(element).pwi(settings).then(function () { // do stuff when the DOM is 
modified });

Thanks,

Original issue reported on code.google.com by etremb...@gmail.com on 15 Jan 2013 at 5:00

GoogleCodeExporter commented 9 years ago
Has been implemented in the latest version, using a callback.

4 callbacks have been added (onAlbumsStart, onAlbumsEnd, onAlbumStart and 
onAlbumEnd), which are called before and after processing of the album overview 
and contents of an album.

Demo 5 now includes a demo of onAlbumsStart, but this can also be used to show 
how to implement the other callbacks.

Original comment by borkh...@gmail.com on 7 Apr 2013 at 9:00