Open pindia opened 12 years ago
Hello Pindi,
I like the idea of a show
event!
I'm wondering though if there's a more robust way to make sure the element is indeed being displayed (i.e. attached to the document/DOM).
For example, in your test case, neither obj1
nor obj2
is appended to $$.document
, so neither is actually "shown".
Perhaps the way to go about this is to add a hook into $$.document
methods like .append()
that traverses the hierarchy of sub-objects being appended/prepended/etc and then fire the corresponding show
events?
I've added a new event "show" that is dispatched on an object is added to a container and thus added to the DOM proper. Some use cases for this are:
Related issues: #52