-
Notifications
You must be signed in to change notification settings - Fork 20
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
#346 - add renderIfAttached method to View.js #352
base: master
Are you sure you want to change the base?
Conversation
…he view is active and attached to the dom
Why does the caller have to care about if it's attached? I'd rather just add this attached and active logic to the
The outward API shouldn't have to know or care if it's attached when calling render. |
Specifically, the view rendering should know if the content inside it will be affected if rendered detatched or deactivated. The view rendering should add it's own |
I think I'm convinced by you @kentmw. @mandragorn since you created the original issue? Do you have any argument that wants to do it this way instead of just a prerender logic? |
kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young kent.willis josh.young [Aside from Kent after reading this a second time: I often look at rendered dom fragments in a view to determine which view it is in the debugger. Often times it's a better natural identifier than cid or other fields. It will tell you which kind of view and the rendered content. As in a list view, etc.] kent.willis josh.young kent.willis josh.young ... [conversation about hammer omitted] ... kent.willis
i have fears of unknown consequences of changing an assumption baked into the lowest level. Does feedback or the myriad of things rely on it? maybe not josh.young |
Ugh, I looked into adding:
But all views are detached before rendered and put back on. So, a view never renders where it is attached. |
For future dev, this is what I put in before realizing the issue:
|
add renderIfAttached method to View.js that only renders if the view is active and attached to the dom