Skip to content

Deprecation warnings about sendAction #151

Closed
@dknutsen

Description

When upgrading an app to Ember 3.4 using ember-introjs v2.6.3 I'm now seeing some deprecation warnings regarding sendAction:

e.g.

DEPRECATION: You called <reader-app@component:intro-js::ember1132>.sendAction("on-before-change") but Component#sendAction is deprecated. Please use closure actions instead.

I'd be happy to open a PR changing to closure action invocation style, something like this look ok?

  _onChange(targetElement) {
    this.sendAction('on-change', this._getNextStep(), this, targetElement);
  },

becomes:

  _onChange(targetElement) {
    if(this.get('on-change')) {
      this.get('on-change')(this._getNextStep(), this, targetElement);
    }
  },

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions