MCPcopy Index your code
hub / github.com/processing/p5.js / generateButton

Function generateButton

test/unit/dom/dom.js:20–26  ·  view source on GitHub ↗
(name, className = null)

Source from the content-addressed store, hash-verified

18 let myp5Container;
19
20 const generateButton = (name, className = null) => {
21 const button = mockP5Prototype.createButton(name);
22 if (className) {
23 button.class(className);
24 }
25 return button;
26 };
27
28 const generateDiv = (id = null, className = null) => {
29 const div = mockP5Prototype.createDiv();

Callers 1

dom.jsFile · 0.85

Calls 1

classMethod · 0.80

Tested by

no test coverage detected