UNPKG

ember-source

Version:

A JavaScript framework for creating ambitious web applications

31 lines (26 loc) 615 B
import { g as get } from '../../../../../shared-chunks/property_get-CAFdpRyu.js'; import Mixin from '../../../../object/mixin.js'; /** @module ember */ /** @class ActionSupport @namespace Ember @private */ const ActionSupport = Mixin.create({ send(actionName, ...args) { let action = this.actions && this.actions[actionName]; if (action) { let shouldBubble = action.apply(this, args) === true; if (!shouldBubble) { return; } } let target = get(this, 'target'); if (target) { target.send(...arguments); } } }); export { ActionSupport as default };