IChild

Extends IEventEmitter.

Interface for an object that has a parent.

Constructor | Fields | Events | Methods

Constructor

IChild()

Fields

Name Type Description
events IEventManager

Event manager.

Inherited from IEventEmitter.

Events

Name Description
parentchange

The parent object reference changed.

Data fields:

  • oldParent - Old parent.
  • newParent - New parent.

Methods

Name Returns Description
getParent()

Object

Returns reference to the parent object.

setParent(parent)

IChild

Sets the parent object.

Events details

parentchange

The parent object reference changed.

Data fields:

  • oldParent - Old parent.
  • newParent - New parent.

Methods details

getParent

{Object} getParent()

Returns reference to the parent object.

setParent

{IChild} setParent(parent)

Sets the parent object.

Returns self-reference.

Parameters:

Parameter Default value Description
parent *

Type: Object

Parent object.

* Mandatory parameter/option.