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

Method html

src/dom/p5.Element.js:384–394  ·  view source on GitHub ↗

* @param {String} [html] the HTML to be placed inside the element * @param {Boolean} [append] whether to append HTML to existing * @chainable

(...args)

Source from the content-addressed store, hash-verified

382 * @chainable
383 */
384 html(...args) {
385 if (args.length === 0) {
386 return this.elt.innerHTML;
387 } else if (args[1]) {
388 this.elt.insertAdjacentHTML('beforeend', args[0]);
389 return this;
390 } else {
391 this.elt.innerHTML = args[0];
392 return this;
393 }
394 }
395
396 /**
397 * Sets the element's ID using a given string.

Callers 15

greetFunction · 0.80
keyPressedFunction · 0.80
toggleVidFunction · 0.80
setupFunction · 0.80
drawFunction · 0.80
toggleAudioFunction · 0.80
toggleVidFunction · 0.80
sketch0Function · 0.80
drawFunction · 0.80
drawFunction · 0.80
toggleSoundFunction · 0.80
toggleMicFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected