0

I am using PptxGenJS and I want to run a function after I save my PowerPoint. I figured I could use the .then(...) method, because the library already uses Promise.

However when I do try something like this:

pptx.save('Sample Presentation').then(function(){
    alert('done saving');
});

The .then(..) block does not execute.

Is there some other way to get my script to wait till the save action has been fully completed?

Eloy Sosa
  • 1
  • 1
  • 1

1 Answers1

0

In 'PptxGenJS' documentation also they mentioned,

pptx.save('Sample Presentation', ()=> {
           //do your stuff here
         });
Prasanth S
  • 525
  • 5
  • 19
  • 1
    Thanks @Prasanth-S, but I was looking to run action after saving has been completed-- this runs as save dialog is still open. It seems like there is no way to do this without a nodeJS implementation. – Eloy Sosa Dec 18 '18 at 20:51