Skip to content
This repository has been archived by the owner on Dec 23, 2019. It is now read-only.

Components should be placed, not told where to place themselves #75

Open
mattdenner opened this issue Apr 19, 2013 · 1 comment
Open
Milestone

Comments

@mattdenner
Copy link

At the moment the behaviour of the components is that a parent hands the child a jQuery selection, inside which the child is supposed to draw itself. Unfortunately at construction time this selection may not exist, and hence we get the setupPresenter/View/Model paradigm that is in the code. Instead, components should construct themselves and enable parents to retrieve the DOM element that is to be placed on the screen, and through which events will pass.

@mattdenner
Copy link
Author

Obviously this is then leading to the idea that components communicate through the DOM events on the returned element. Those events should be custom events as components should handle low-level DOM events internally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant