Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(root, options = {}) {
this.root = root;
this.options = options;
this.doc = root.ownerDocument;
this.win = this.doc.defaultView || this.doc.parentWindow;
this.parser = new HtmlParser('', {autoFix: options.autoFix});
// Actual elements by id.
this.actuals = [root];
// Embodies the "structure" of what's been written so far,
// devoid of attributes.
this.proxyHistory = '';
// Create a proxy of the root element.
this.proxyRoot = this.doc.createElement(root.nodeName);
this.scriptStack = [];
this.writeQueue = [];
setData(this.proxyRoot, 'proxyof', 0);
}