repository at https://github.com/processing/p5.js/wiki/Frequently-Asked-Questions
Use of .parent() function call where you want sketch() to run in index.html.
Bruno skrovic explains as below:
Processing.js creates processing.pde file to be run on index.html, which includes the following:
<head> http://../processing.min.js </head> <body> <canvas data-processing-sources="sketch.pde"></canvas> </body>
p5.js creates sketch.js file to be run on index.html, which includes the following:
http://../p5.js <!-- uncomment lines below to include extra p5 libraries --> <!--http://../addons/p5.dom.js--> <!--http://../addons/p5.sound.js--> http://sketch.js
Read further of his analysis at https://www.sitepoint.com/processing-js-vs-p5-js-whats-difference/