From 0944d6d8ab504e34a9293b9e2ca7d96f81b387c5 Mon Sep 17 00:00:00 2001 From: Anton Verinov Date: Thu, 30 Nov 2017 11:06:21 +0200 Subject: [PATCH] update README --- CHANGELOG.md | 2 +- README.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 885bcc3..80dc015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.9.0 -* :heavy_plus_sign: [added] support for async bazFunc calls via [Intersection Observer](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). In [browsers without Intersection Observer support](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#Browser_compatibility), falls back to the equivalent of `setTimeout(bazFunc, 1, node)`. Check out [\_async example](/examples/_async) +* :heavy_plus_sign: [added] support for async bazFunc calls via [`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). In [browsers without `IntersectionObserver` support](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#Browser_compatibility), falls back to the equivalent of `setTimeout(bazFunc, 1, node)`. Check out [\_async example](/examples/_async) ```html /* (old) sync call */ diff --git a/README.md b/README.md index 02b76b1..5282154 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ $ npm install bazooka ### Browser Support -Bazooka uses [MutationObserver](https://developer.mozilla.org/en/docs/Web/API/MutationObserver) to watch for DOM updates. If you want to use `Baz.watch()` and need to support [browsers without MutationObserver](http://caniuse.com/#feat=mutationobserver), you'll need any MutationObserver polyfill (we recommend [this one](https://www.npmjs.com/package/mutation-observer)) +Bazooka uses [`MutationObserver`](https://developer.mozilla.org/en/docs/Web/API/MutationObserver) to watch for DOM updates. If you want to use `Baz.watch()` and need to support [browsers without `MutationObserver`](http://caniuse.com/#feat=mutationobserver), you'll need any `MutationObserver` polyfill (we recommend [this one](https://www.npmjs.com/package/mutation-observer)) + +Also, Bazooka can initiate components asynchriously (when component's node comes into viewport, via `data-baz-async="viewport"` HTML attribute). For that, Bazooka uses [`IntersectionObserver`](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). In [browsers without `IntersectionObserver` support](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#Browser_compatibility), falls back to the equivalent of `setTimeout(bazFunc, 1, node)` ## Examples