-
Notifications
You must be signed in to change notification settings - Fork 14
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
Hitch dependency functionality #14
Comments
Should this be "built in to the declaration" or imperative... Your example looks imperative, but why not add optional props to the declaration? { The advantage to that is that we could spell out something in the lifecycle to make sure that they were included if that is necessary... But maybe you are saying it's not... I dont know... |
My example is imperative because there is potentially the need to logically download CSS based on attributes from a Hitch widget (or some other form of context data). Declarative would lose the ability to know "when" or "why" to download. However I see no harm in having this as a part of the Hitch.add({}) model. There is always the use-case of knowing exactly what you want and wanting that downloaded as soon as possible. |
The flip side of allowing imperative though is that there is a relationship
|
I agree, we really should solve this... it is way past time. |
When authoring a Hitch there are occassions where you'd like to include 3rd party scripts and styles. It would be nice if Hitch provided this ability so that you aren't writing all the boilerplate code each time.
Hitch.resource.link(URL);
Adds the tag with the src = URL
Hitch.resource.script(URL);
Adds the <script> tag with the src = URL
Things to beware:
Eventing to assure readiness
Duplication of downloads
The text was updated successfully, but these errors were encountered: