Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fire event should set the details of the custom event #61

Open
steventill opened this issue Jun 29, 2016 · 1 comment
Open

fire event should set the details of the custom event #61

steventill opened this issue Jun 29, 2016 · 1 comment

Comments

@steventill
Copy link

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

node.dispatchEvent(event);

};

@jarrodek
Copy link

jarrodek commented Jan 9, 2017

I'm requesting this too.
I'm not allowed to use this function and set detail object which is read only after the CustomEvent is created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants