Skip to content

Commit 876ec34

Browse files
authored
Merge pull request #320 from github/319-delimiters
Docs: surface required delimiters for Targets' and Actions' syntax patterns
2 parents dc284dc + 43a6b7f commit 876ec34

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/_guide/actions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ class HelloWorldElement extends HTMLElement {
6868
The actions syntax follows a pattern of `event:controller#method`.
6969

7070
- `event` must be the name of a [_DOM Event_](https://developer.mozilla.org/en-US/docs/Web/Events), e.g. `click`.
71+
- `:` is the required delimiter between the `event` and `controller`.
7172
- `controller` must be the name of a controller ascendant to the element.
73+
- `#` is the required delimieter between the `controller` and `method`.
7274
- `method` (optional) must be a _public_ _method_ attached to a controller's prototype. Static methods will not work.
7375

7476
If method is not supplied, it will default to `handleEvent`.

docs/_guide/targets.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class HelloWorldElement extends HTMLElement {
5555
The target syntax follows a pattern of `controller.target`.
5656

5757
- `controller` must be the name of a controller ascendant to the element.
58+
- `.` is the required delimiter between `controller` and `target`.
5859
- `target` must be the name matching that of a `@target` (or `@targets`) annotated field within the Controller code.
5960

6061
### Multiple Targets

0 commit comments

Comments
 (0)