summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilson Page <wilsonpage@me.com>2013-10-15 11:26:33 +0100
committerWilson Page <wilsonpage@me.com>2013-10-15 11:26:33 +0100
commit02a04b619b08ec54b6e4933d2c036816b6234fb0 (patch)
treedcf48cc887297c2b2015de8af5441a91a05c592c
parent226fe9f99ab9c7eb0cc0bd53dd6af977e8d686d5 (diff)
downloadfastdom-02a04b619b08ec54b6e4933d2c036816b6234fb0.zip
fastdom-02a04b619b08ec54b6e4933d2c036816b6234fb0.tar.gz
fastdom-02a04b619b08ec54b6e4933d2c036816b6234fb0.tar.bz2
onError documentation
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 41a3d4f..2cdb936 100644
--- a/README.md
+++ b/README.md
@@ -118,6 +118,17 @@ fastdom.clear(write);
fastdom.clear(defer);
```
+## Exceptions
+
+FastDom is async, this can therefore mean that when a job comes around to being executed, the node you were working with may no longer be there. These errors are usually not critical, but they can cripple your app. FastDom allows you to register an `onError` handler. If `fastdom.onError` has been registered, FastDom will catch any errors that occur in your jobs, and run the handler instead.
+
+```js
+fastdom.onError = function(error) {
+ // Do something if you want
+};
+
+```
+
## Tests
#### With PhantomJS