mixins/evented.js

Mixins

EventedMixin

Methods

inner evented(target, optionsopt) → {Object}

Applies EventedMixin to a target object.

Parameters:
Name Type Attributes Default Description
target Object

The object to which to add event methods.

options Object <optional>
{}

Options for customizing the mixin behavior.

Properties
Name Type Attributes Description
eventBusKey String <optional>

By default, adds a eventBusEl_ DOM element to the target object, which is used as an event bus. If the target object already has a DOM element that should be used, pass its key here.

Returns:
Object -

The target object.

inner isEvented(object) → {boolean}

Returns whether or not an object has had the evented mixin applied.

Parameters:
Name Type Description
object Object

An object to test.

Returns:
boolean -

Whether or not the object appears to be evented.