-
Notifications
You must be signed in to change notification settings - Fork 71
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
review addDOMLoadEvent #2
Comments
I see this one is still open. I have a different comment on it: I wonder if we should auto run hinclude, in some cases we want to do something first before triggering it. With the current code it is not possible. The easiest way is to completely remove this line: hinclude.addDOMLoadEvent(function () { hinclude.run(); }); The second way, is that within the run method we can check for some configuration such as var load = this.get_meta("include_load", "custom"); What do you think? |
I don't think hInclude should take over the DOM loading infrastructure; there are plenty of libraries out there for that. |
Actually, what I mean to say is that hinclude should not automatically trigger on domload event the way it is working right now. There are use cases when we want to manually trigger hinclude instead. |
Seems like that function is being used as constructor. Maybe refactor it to be like this
|
Make sure that addDOMLoadEvent is still relevant / correct, and plays nicely with jquery, etc.
The text was updated successfully, but these errors were encountered: