You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
global.fireEvent = function(type, props, node) {
// detail is a readonly event on custom event if it is not set when you create it
var event = new CustomEvent(type, {
bubbles: true,
cancelable: true,
detail: props
});
node.dispatchEvent(event);
};
The text was updated successfully, but these errors were encountered:
Description
fireevent does not properly pass the details to the event handler
Expected outcome
the receiving event handler has detail set to what props are
Actual outcome
all of the props are props on the event and detail is undefined
Steps to reproduce
TestHelper.fireevent( 'item-removed', { id: '123' } );
Browsers Affected
all
Possible fix
global.fireEvent = function(type, props, node) {
// detail is a readonly event on custom event if it is not set when you create it
var event = new CustomEvent(type, {
bubbles: true,
cancelable: true,
detail: props
});
};
The text was updated successfully, but these errors were encountered: