mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 20:24:51 +08:00
20 lines
414 B
JavaScript
20 lines
414 B
JavaScript
'use strict';
|
|
|
|
(w=>{
|
|
|
|
// Edge Legacy (pre chromium/webkit), Firefox < 69, Safari < 13.4
|
|
w.ResizeObserver || (w.ResizeObserver = class {
|
|
constructor(callback) {
|
|
this.observer = new MutationObserver(callback.debounce(250));
|
|
}
|
|
|
|
disconnect() {
|
|
this.observer.disconnect();
|
|
}
|
|
|
|
observe(target) {
|
|
this.observer.observe(target, { attributes: true, subtree: true, attributeFilter: ['style'] });
|
|
}
|
|
});
|
|
|
|
})(this);
|