1
0
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:
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 * @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);
} }
} }