Fork me on GitHub

AFrameJS

- Javascript MVC Library

class AFrame.Plugin class extends AFrame.AObject

A basic plugin, used to extend functionality of an object without either subclassing or directly extending that object. Plugins make it easy to create configurable objects by adding small units of coherent functionality and plugging a base object. When creating an object, if the functionality is needed, add the plugin, if not, leave it out. When the plugged object is torn down, the plugin will automatically be torn down as well.

Constructor

Constructor Parameters Returns
AFrame.Plugin( )

Methods

Methods Returns Description
getPlugged( ) AFrame.AObject

Get a reference to the plugged object.

Returns:

  • <AFrame.AObject>

    the plugged object

onPluggedInit( ) void

Override to do some specialized handling when a plugged object is initialized.

Events inherited from AFrame.AObject

Events Notes
onInit
onTeardown

Configuration Attributes inherited from AFrame.AObject

Attributes Notes
{cid} cid