-
Notifications
You must be signed in to change notification settings - Fork 1
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
Required attachments #2
Comments
@yckart I agree. I have been using Attach on a project recently and have often found issues with loading and instantiation where one attachment depends on another, or if one manipulates the DOM onLoad/DOMContentReady and another is skipped because it sits within it.. (don't think that makes sense, butI think this sort of interface might help. |
@mrmartineau in situations where you have several modules that depend on each other I would write another module that governs their creation and any other inter-dependent logic. I would attach this module to the parent container instead of attaching all the child modules. For example if you had several types of filters on a page that triggered each other. You could keep those filters single purpose and create a |
Let's assume that we want to add an editor to some sort of input field and in some cases (wysiwyg instead of markdown mode, or whatever reason) also a toolbar. This toolbar requires that the editor is attached, as the editor give's access to the current value and selection. This might be not the best example, but would be a case where it could be helpful to have this feature available. |
It would nice to have the possibility to add dependent attachments.
Sure, we could do this simply like so:
...however, makes sense to me to let this managed internally:
Update
Just don't know what's the best way to go. Either check if the current node resolves all dependencies, or for the existence of those dependencies somewhere in the dom...
The text was updated successfully, but these errors were encountered: