8000 Introduce event callback option for all components · Issue #70 · frend/frend.co · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Introduce event callback option for all components #70
Open
@adamduncan

Description

@adamduncan

A lot of quality plugins have event emitter setups, but that might be a bit overkill for Frend bits.

Would be nice for this to be consistent amongst components. Is it as simple as adding an onToggle property to the options object that takes a function and passes the instance?

var myTabs = Frtabs({
  onToggle: function (tabs) {
    // do something
  }
});

As part of this, do we need to start storing things like the active element on each instance, so they can be referenced in these callbacks? I.e. tabs.activeTab

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0