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

Adding detail to object, including originalEvent, to custom events. #254

Merged
merged 1 commit into from
Dec 29, 2018

Conversation

joeldenning
Copy link
Member

@joeldenning joeldenning commented Dec 29, 2018

The reason for this change is a pending feature for single-spa-angular that needs the single-spa:routing-event CustomEvent to tell it whether the routing event was caused by a popstate event, a hashchange event, or neither.

}
}
window.dispatchEvent(new CustomEvent("single-spa:before-routing-event", myCE));
window.dispatchEvent(new CustomEvent("single-spa:before-routing-event", getCustomEventDetail()));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically a breaking change. For the before-routing-event, we used to be providing an event object as the custom event detail but we no longer are.

However, that was an undocumented feature and one that I don't think anyone actually uses. It was originally put in to support some stuff in single-spa-canopy, but not even that project uses it anymore.

},
"browserslist": [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A somewhat random stab at what browsers we should support with single-spa. Before this PR, we were basically just doing preset-es2015 (since that's mostly the default for preset-env)

Copy link
Contributor

@TheMcMurder TheMcMurder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. 🐙

@joeldenning joeldenning merged commit c2abbda into master Dec 29, 2018
@joeldenning joeldenning deleted the routing-event-detail branch December 29, 2018 20:00
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

Successfully merging this pull request may close these issues.

None yet

2 participants