These are chat archives for rosshinkley/nightmare

23rd
Jan 2017
sleepyCoder666
@sleepyCoder666
Jan 23 2017 13:51
Hi.. I find there is an api to save the content once the page gets loaded: .html(folderPath, 'HTMLComplete'). But is there any way to get hold of the files on the fly as they get downloaded? To be more precise I want to access the html and css files as soon as they are downloaded. Is that somehow possible?
sleepyCoder666
@sleepyCoder666
Jan 23 2017 15:38
Also, I find that the above API .html(folderPath, 'HTMLComplete') adds a high delay. For example, simply loading one URL takes 3secs while loading and saving the same takes as much as 16secs. So I was wondering if there is a faster way to get hold of all the files that are required to load the page.
Gabin Desserprit
@gahabeen
Jan 23 2017 16:15
Hi guys, how would you get an external function available inside an .evaluate() function to Nightmare? as to not get anymore "functionName is not defined".
Should I save it under a file and inject it? Should I create a prototype for Nightmare directly ?
Thanks ;)