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

No event triggered when pre-generated content is shown? #3286

Closed
jonas-db opened this issue Dec 18, 2016 · 3 comments
Closed

No event triggered when pre-generated content is shown? #3286

jonas-db opened this issue Dec 18, 2016 · 3 comments

Comments

@jonas-db
Copy link

From the documentation it seems that none of the events are triggered when the element is already in the the DOM (e.g. generated HTML from server), or am I wrong? Is there any way to have an event triggered in this case? A potential use case I have in mind is that for example jQuery needs to initialize/register something which would usually occur in the render event.

http://marionettejs.com/docs/master/viewlifecycle.html#views-associated-with-previously-rendered-or-attached-dom

@paulfalgout
Copy link
Member

This was my suggestion: #3243

I would be against triggering render or attach since those things have already occurred.. and simply triggering them seem like a hack to get around the actual issue that there is no event.

In the meantime this can be handled however inside the initialize by checking isRendered()

@jonas-db
Copy link
Author

I see, I will close this in favour of that one.

@paulfalgout
Copy link
Member

ping @marionettejs/marionette-core

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