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

"Refresh" based on an event #68

Open
leroy0211 opened this issue Dec 11, 2018 · 0 comments
Open

"Refresh" based on an event #68

leroy0211 opened this issue Dec 11, 2018 · 0 comments

Comments

@leroy0211
Copy link

leroy0211 commented Dec 11, 2018

Would love to have default support to "refresh" the hincluded section based on an event.

For example:

  • You click a button
  • You trigger for example a window event called: something_clicked
  • The hinclude will show the default text it should show like "Loading..."
  • The hinclude wil be "refreshed" with new content from the src attribute

This can be very usefull when working with session specific data, like a cart, etc.

The hinclude tag could be something like

<hx:include src="/remote.html" data-on="window.something_clicked">Loading...</hx:include>

You can make it a "rule" that the "on" attribute must exists of [css-selector].[event-name]

So next data-on attributes are valid:

  • data-on="#my-container.refresh"
  • data-on=".container.my-custom-event"
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

1 participant