Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13886 closed enhancement (fixed)

add getParent() to _WidgetBase

Reported by: bill Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


Add getParent() to _WidgetBase, but able to find the parent widget regardless of whether or not it extends _Container or sets isContainer.

Since _WidgetBase now supports getChildren(), it makes sense to support getParent() too.

Change History (2)

comment:1 Changed 10 years ago by bill

Resolution: fixed
Status: newclosed

In [26531]:

Simplification of startup() code:

  1. Remove isContainer: flag and instead make all widgets obey the isContainer:true contract of starting their children.
  2. Move _Container.startup() to _WidgetBase.
  3. Move _Contained.getParent() to _WidgetBase, alongside getChildren(). But isContainer related code was removed.
  4. Removed _Container.destroyDescendants() since it was redundant with _WidgetBase.destroyDescendants()
  5. In parser, when deciding which widgets to startup, just check widget._started flag. No need to call getParent(), because if the widget did have a parent, the parent would have called startup() and _started would already be set.

Fixes #13886, #13887 !strict.

comment:2 Changed 10 years ago by bill

In [26543]:

remove getParent() calls from dojox/mobile/parser, same as for dojo/parser in [26531], refs #13886, fixes #13892, !strict.

Note: See TracTickets for help on using tickets.