Category : events

In Vue, I create a "speechRecog" instance that instantiates a class instance "SpeechRecognizer", which itself starts the "SpeechRecognition" WebAPI. That WebAPI can switch off recognition automatically (when set continuous is set to false), which issues an onspeechend event. In my class this event calls the stopRecognition() method, which stops the SpeechRecognition alltogether. That works. But ..

Read more

I was having issues with ‘transitionEnd’ not firing, until I realized it had to be ‘transitionend’. I know that in the documentation for the TransitionEvent interface shows the events as all lowercase but my brain was typing in camelcase. Upon further looking I noticed all event names are lowercase, but nearly everything else in JavaScript ..

Read more

Currently, I defined a function in which some events are placed. These events should be in global scope. When a specific event (something like connection event) happens in the application, this function, addWebrtcEvent, will be called. function addWebrtcEvent(id) { window[‘peer_’ + id] = peers[id][‘cnnObj’]; window[‘peer_’ + id].on(‘stream’, stream => { console.log(‘got remote stream’); }); window[‘peer_’ ..

Read more

I’m building very simple forms with multiple submit buttons in React. function SomeForm() { const onSubmit = (e: FormEvent) => { e.preventDefault(); console.log("submitted form button name is", e.nativeEvent?.submitter.name); } return ( <form onSubmit={onSubmit}> <input type="text" name="someInput" /> <button type="submit" name="btn1">Btn1</button> <button type="submit" name="btn2">Btn2</button> </form> ); } Will form event’s nativeEvent.submitter.name work consistently across all browsers? ..

Read more