1
0
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:
Antonio Laguna
2017-01-28 16:27:38 +01:00
parent 75de8a46ac
commit 72d057293e

View File

@@ -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);
}
}