16 lines
320 B
Markdown
16 lines
320 B
Markdown
![]() |
---
|
||
|
title: on()
|
||
|
---
|
||
|
|
||
|
```js
|
||
|
void pattern.on(string hook, function method)
|
||
|
```
|
||
|
|
||
|
Allows you to attach a method to one of our hooks.
|
||
|
|
||
|
Takes the hook name as a first argument, and your method as a second.
|
||
|
|
||
|
See [extending freesewing](/extend/) for details about extending freesewing with hooks.
|
||
|
|
||
|
<Fixme>Code example</Fixme>
|