Closed maxkfranz closed 8 years ago
i.e.
Shouldn't execute code in Phantom via page.evaluate() or page.evaluateJavaScript() until after onLoadFinished
page.evaluate()
page.evaluateJavaScript()
onLoadFinished
phantomInstance.on('onLoadFinished', function(){ // now we can execute });
Otherwise, we could have a race condition where the Cytoscape instance isn't available yet, since it's loaded on DOMContentLoaded.
DOMContentLoaded
Assume the page open promise is resolved when the page is fully loaded. Closing
i.e.
Shouldn't execute code in Phantom via
page.evaluate()
orpage.evaluateJavaScript()
until afteronLoadFinished
Otherwise, we could have a race condition where the Cytoscape instance isn't available yet, since it's loaded on
DOMContentLoaded
.