How to use prescribe - 1 common examples

To help you get started, we’ve selected a few prescribe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github krux / postscribe / src / write-stream.js View on Github external
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);
  }

prescribe

Tiny, forgiving HTML parser

MIT
Latest version published 7 years ago

Package Health Score

53 / 100
Full package analysis

Popular prescribe functions