code0n Posted December 29, 2018 Share Posted December 29, 2018 i have make an button object inside which event listener , enable, disable activity is being done and when i m making an object of button inside the another object i.e., ui.js then it is showing a.dispatchEvent is not a function(). Help me to get out of it Quote Link to comment Share on other sites More sharing options...
mattstyles Posted January 2, 2019 Share Posted January 2, 2019 Hi @code0n https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events This is a good resource on using `dispatchEvent`. However, generally speaking, using `dispatchEvent` (in application code) is a bit of a code smell i.e. there are probably better ways to achieve what you want than 'faking' a DOM event. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.