blob: e9f04ffee8c52aed63b08859b6263a398bf33410 [file] [log] [blame]
import { NodeMutation } from '../../../common/nodeWatcher/NodeWatcherHandler';
import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
import { InfiniteScrollNodeWatcherOptions } from '../scripts/ccInfiniteScroll.script';
export default class CCInfiniteScrollLoadMoreBarHandler extends CssSelectorNodeWatcherScriptHandler<InfiniteScrollNodeWatcherOptions> {
cssSelector = '.load-more-bar';
onMutatedNode({ node }: NodeMutation) {
if (!(node instanceof Element)) {
console.error(
'[CCInfiniteScrollLoadMoreBarHandler] Node is not an Element: ',
node,
);
return;
}
this.options.ccInfiniteScroll.observeLoadMoreBar(node);
}
}