Skip to content

Commit

Permalink
Merge pull request #271 from ember-learn/fix-deprecate-inherited-link
Browse files Browse the repository at this point in the history
[BUGFIX] Fixes the link for Prototype Function Listeners deprecation
  • Loading branch information
rwjblue authored Feb 2, 2019
2 parents ca7df01 + eae9bdb commit f4c425f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/ember/v3/deprecate-inherit-function-listeners.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: events.prototype-function-listeners
id: events.inherited-function-listeners
title: Prototype Function Listeners
until: '3.9.0'
since: 'Upcoming Features'
Expand Down Expand Up @@ -46,6 +46,7 @@ In cases where function listeners have been added to a prototype, and those
functions _do_ exist on the prototype, replace them with string listeners:

Before:

```js
class Foo {
method() {}
Expand All @@ -55,6 +56,7 @@ addListener(Foo, 'event', null, Foo.prototype.method);
```

After:

```js
class Foo {
method() {}
Expand All @@ -68,6 +70,7 @@ functions which do not exist on the prototype, you can convert the function to a
method, create a wrapper function, or add the listener on the instance instead:

Before:

```js
function foo() {}

Expand All @@ -77,6 +80,7 @@ addListener(Foo, 'event', null, foo);
```

After:

```js
class Foo {
foo() {}
Expand Down

0 comments on commit f4c425f

Please sign in to comment.