Added documentation

This commit is contained in:
Johan Vosloo 2020-12-30 15:00:24 +01:00
parent b46e8ab10f
commit d529108045

View File

@ -39,6 +39,23 @@ You can use a `*` to match any path component:
</div>
```
#### Javascript API
### <a name="refresh"></a> Method - [`PathDeps.refresh()`](#refresh)
This method manually triggers a refresh for the given path.
##### Parameters
* `path` - the path to refresh
##### Example
```js
// Trigger a refresh on all elements with the path-deps attribute '/path/to/refresh', including elements with a parent path, e.g. '/path'
PathDeps.refresh('/path/to/refresh');
```
#### Source
<https://unpkg.com/htmx.org/dist/ext/path-deps.js>