SVG framework function: resumeObserver
This tutorial is part of Iconify SVG Framework functions tutorial.
Function resumeObserver() tells SVG framework to continue watching HTML element for icon placeholders that was paused using pauseObserver().
Usage
Function has the following optional parameter:
- root, HTMLElement. Element to resume observing. If missing, SVG framework will resume all paused observers.
Example
js
// Pause observer
Iconify.pauseObserver();
// Do some heavy DOM manipulation
// ...
// ...
// Resume observer
Iconify.resumeObserver();
Notes
- Pause tracker is a number, it increases with every call. If you call pauseObserver() multiple times, you need to call resumeObserver() the same amount of times to resume observer.
- This function works only on elements that are paused using pauseObserver(). If you want to watch a new custom element for changes, use observe() instead.