File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -241,15 +241,28 @@ p5.Element.prototype.mouseOver = function (fxn) {
241241 * This can be used to attach an element specific event listener.
242242 *
243243 * @method changed
244- * @param {Function } fxn function to be fired when mouse is
245- * moved over the element.
244+ * @param {Function } fxn function to be fired when the value of an element changes.
246245 * @return {p5.Element }
247246 */
248247p5 . Element . prototype . changed = function ( fxn ) {
249248 attachListener ( 'change' , fxn , this ) ;
250249 return this ;
251250} ;
252251
252+ /**
253+ * The .input() function is called when any user input is detected with an element.
254+ * The input event is often used to detect keystrokes in a input element,
255+ * or changes on a slider element. This can be used to attach an element specific event listener.
256+ *
257+ * @method input
258+ * @param {Function } fxn function to be fired on user input.
259+ * @return {p5.Element }
260+ */
261+ p5 . Element . prototype . input = function ( fxn ) {
262+ attachListener ( 'input' , fxn , this ) ;
263+ return this ;
264+ } ;
265+
253266/**
254267 * The .mouseOut() function is called once after every time a
255268 * mouse moves off the element. This can be used to attach an
You can’t perform that action at this time.
0 commit comments