Skip to content

Commit 1c5ea02

Browse files
committed
fix typo in proxy events and add deprecation notice for dynamic names in proxy events
fixes ractivejs/ractive#2850 closes ractivejs/ractive#2849
1 parent 7ebae96 commit 1c5ea02

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/0.8/Proxy events.md.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,15 @@ Note: the built-in {{{createLink 'lifecycle events'}}} are **reserved**, which m
8282

8383
## Dynamic proxy event names
8484

85+
__Note:__ This functionality is deprecated and will be removed in 0.9. If you need dynamic event names to fire, you can use a method event calling fire with an expression for the name. If you just need an event to be dynamically subscribed, you can place it in an `\{{#if}}` conditional.
86+
8587
{{{createLink 'Mustaches' 'Mustache references'}}} can be used as proxy event names:
8688

8789
```html
8890
<button on-click="\{{handler}}">click me!</button>
8991
```
9092

91-
In practive this is of limited value, but a more important side effect is that if no handler is specified (a falsey value) the DOM event is not subscribed and will unsubscribe or resubscribe as the handler value changes. Combined with a conditional section, this allows a proxy event to be conditionally subscribed _at the DOM level_:
93+
In practice this is of limited value, but a more important side effect is that if no handler is specified (a falsey value) the DOM event is not subscribed and will unsubscribe or resubscribe as the handler value changes. Combined with a conditional section, this allows a proxy event to be conditionally subscribed _at the DOM level_:
9294

9395
```html
9496
<button on-click="\{{#active}}select\{{/}}">click me!</button>

0 commit comments

Comments
 (0)