[DOC] utils: add some basic information

This commit is contained in:
Géry Debongnie
2019-05-10 20:50:14 +02:00
parent dfa7d5932d
commit 6dd7391cdc
3 changed files with 86 additions and 45 deletions
+1
View File
@@ -8,6 +8,7 @@
- [Store](store.md)
- [Observer](observer.md)
- [Virtual DOM](vdom.md)
- [Utility functions](utils.md)
## Miscellaneous
- [Quick Start](quick_start.md)
+41
View File
@@ -0,0 +1,41 @@
# 🦉 Utility functions 🦉
Owl export a few useful utility functions, to help with common issues. Those
functions are all available in the `owl.utils` namespace.
## Content
- [`whenReady`](#whenready)
- [`loadJS`](#loadjs)
- [`loadTemplates`](#loadtemplates)
- [`escape`](#escape)
- [`debounce`](#debounce)
- [`patch` and `unpatch`](#patchandunpatch)
## `whenReady`
The function `whenReady` is useful to register some code that need to be executed
as soon as the document (page) is ready:
```js
owl.utils.whenReady(function () {
const qweb = new owl.QWeb();
const app = new App({ qweb });
app.mount(document.body);
});
```
## `loadJS`
## `loadTemplates`
## `escape`
## `debounce`
## `patch` and `unpatch`