Skip to content

Can we make the script that gets loaded a module #101

@ff6347

Description

@ff6347

I just added for fun this code and it works.

document.addEventListener(
	'DOMContentLoaded',
	() => {
		// console.log(document.body)
		const main = document.createElement('main');
		document.body.appendChild(main);
		main.style.backgroundColor = 'red';
		main.style.height = '100px';
		main.style.width = '100px';
	}
);

Now what if the script we load is a module and we use p5 v2 can we use the sandbox to write module code and make it load as a p5 sketch?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions