mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 11:51:54 +01:00
14 lines
287 B
JavaScript
14 lines
287 B
JavaScript
|
|
// wait for document to load
|
|
window.onload = function () {
|
|
tryFindSketch();
|
|
}
|
|
|
|
function tryFindSketch () {
|
|
var sketch = Processing.instances[0];
|
|
if ( sketch == undefined )
|
|
return setTimeout(tryFindSketch, 200);
|
|
|
|
sketch.setTree( document.body.parentNode );
|
|
}
|