import App from '../index.js'; export default abstract class Observer { protected readonly app: App; protected readonly isTopContext: boolean; private readonly observer; private readonly commited; private readonly recents; private readonly indexes; private readonly attributesMap; private readonly textSet; private readonly disableSprites; /** * this option means that, instead of using link element with href to load css, * we will try to parse the css text instead and send it as css rules set * can (and will) affect performance * * - false: never inline CSS * - true: always inline CSS (old behavior) * - 'auto': automatically detect if CSS should be inlined based on URL type * */ private readonly inlineRemoteCss; private readonly domParser; constructor(app: App, isTopContext?: boolean, options?: { disableSprites: boolean; inlineRemoteCss: boolean | 'auto'; }); /** * Determine if a CSS link should be inlined based on configuration and URL type * @param href - The href attribute of the link element * @returns true if CSS should be inlined */ private shouldInlineCSSLink; private clear; /** * EXPERIMENTAL: Unbinds the removed nodes in case of iframe src change. * * right now, we're relying on nodes.maintainer */ private handleIframeSrcChange; private sendNodeAttribute; private sendNodeData; private bindNode; private bindTree; private unbindTree; private _commitNode; private commitNode; private commitNodes; protected observeRoot(node: Node, beforeCommit: (id?: number) => unknown, nodeToBind?: Node): void; disconnect(): void; }