mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-21 20:35:31 +02:00
Adding to detail instead of needing to add a full object
This commit is contained in:
@@ -65,8 +65,11 @@ export default class DOM {
|
||||
* @param {Object} eventInfo Optional parameter to provide additional data
|
||||
* to the event.
|
||||
*/
|
||||
static fireEvent(target, eventType, eventInfo = { detail: '' }) {
|
||||
const event = new WSCustomEvent(eventType, eventInfo);
|
||||
static fireEvent(target, eventType, eventInfo = {}) {
|
||||
const event = new WSCustomEvent(eventType, {
|
||||
detail: eventInfo
|
||||
});
|
||||
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user