Pass alpine instance to alpine:init
event
#2816
DiskoPete
started this conversation in
3. Feature Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was thinking it would be nice to pass the alpine instance with the
alpine:init
event.This would make it possible to not expose
Alpine
to thewindow
object, if we install alpinejs as a module.https://github.com/alpinejs/alpine/blob/main/packages/alpinejs/src/lifecycle.js#L11
We then could use it like this:
If anyone else would think this could be useful, I would be happy to prepare a pull request.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions