Skip to content

Commit

Permalink
Merge pull request #5207 from Zaharid/childfireevent
Browse files Browse the repository at this point in the history
Children fire event
  • Loading branch information
jdfreder committed Feb 28, 2014
2 parents 44a94be + 03da57b commit 4b9f156
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions IPython/html/widgets/widget_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ class ContainerWidget(DOMWidget):
children = Tuple()
_children = Tuple(sync=True)


def __init__(self, **kwargs):
super(ContainerWidget, self).__init__(**kwargs)
self.on_displayed(ContainerWidget._fire_children_displayed)

def _fire_children_displayed(self):
for child in self._children:
child._handle_displayed()

def _children_changed(self, name, old, new):
"""Validate children list.
Expand Down

0 comments on commit 4b9f156

Please sign in to comment.