mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-22 04:43:42 +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
|
* @param {Object} eventInfo Optional parameter to provide additional data
|
||||||
* to the event.
|
* to the event.
|
||||||
*/
|
*/
|
||||||
static fireEvent(target, eventType, eventInfo = { detail: '' }) {
|
static fireEvent(target, eventType, eventInfo = {}) {
|
||||||
const event = new WSCustomEvent(eventType, eventInfo);
|
const event = new WSCustomEvent(eventType, {
|
||||||
|
detail: eventInfo
|
||||||
|
});
|
||||||
|
|
||||||
target.dispatchEvent(event);
|
target.dispatchEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user