This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.
⚠️⚠️⚠️⚠️⚠️⚠️
Releases
corset@2.5.0-next.0
Minor Changes
38ff738: Allow specifying an alternative event target with event-target
This now allows specifying an alternative event target via the new event-target property. You can use it like this:
In the above we are able to use a selector to listen to the popstate event that is on the window object.
This can also be used with any object that follows the EventTarget interface:
import sheet, { mount } from "https://cdn.corset.dev/v2";
let target = new EventTarget();
// Now this can be shared around
mount(
document,
class {
bind() {
return sheet`
#app {
event: foo ${() => console.log("foo event occurred!")};
event-target: foo ${target};
}
some-custom-element {
prop: events ${target};
}
`;
}
}
);
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
main
is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exit
onmain
.⚠️⚠️⚠️⚠️⚠️⚠️
Releases
corset@2.5.0-next.0
Minor Changes
38ff738: Allow specifying an alternative event target with event-target
This now allows specifying an alternative event target via the new
event-target
property. You can use it like this:In the above we are able to use a selector to listen to the popstate event that is on the window object.
This can also be used with any object that follows the EventTarget interface: