How to use @glimmer/node - 6 common examples

To help you get started, we’ve selected a few @glimmer/node 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 glimmerjs / glimmer-vm / packages / @glimmer / integration-tests / lib / suites / custom-dom-helper.ts View on Github external
'can instantiate NodeDOMTreeConstruction without a document'() {
    // this emulates what happens in Ember when using `App.visit('/', { shouldRender: false });`

    let helper = new NodeDOMTreeConstruction(null as any);

    this.assert.ok(!!helper, 'helper was instantiated without errors');
  }
}
github glimmerjs / glimmer.js / packages / @glimmer / ssr / src / environment.ts View on Github external
constructor(options) {
    super({
      appendOperations: new NodeDOMTreeConstruction(options.document),
      updateOperations: undefined, // SSR does not have updateOperations
    });

    setOwner(this, getOwner(options));
  }
github glimmerjs / glimmer-vm / packages / @glimmer / integration-tests / lib / modes / rehydration / delegate.ts View on Github external
getElementBuilder(env: Environment, cursor: Cursor): ElementBuilder {
    if (cursor.element instanceof Node) {
      return debugRehydration(env, cursor);
    }

    return serializeBuilder(env, cursor);
  }
github glimmerjs / glimmer-vm / packages / @glimmer / integration-tests / lib / suites / custom-dom-helper.ts View on Github external
getElementBuilder(env: Environment, cursor: Cursor) {
    return serializeBuilder(env, cursor);
  }
}
github glimmerjs / glimmer-vm / packages / @glimmer / test-helpers / lib / environment / modes / ssr / environment.ts View on Github external
function testOptions(options: NodeEnvironmentOptions) {
  let document = options.document;
  let appendOperations: Maybe = options && options.appendOperations;
  let updateOperations: Maybe = options && options.updateOperations;

  if (!appendOperations) {
    appendOperations = new NodeDOMTreeConstruction(document);
  }

  if (!updateOperations) {
    updateOperations = new DOMChanges(document as HTMLDocument);
  }

  return { appendOperations, updateOperations, document };

}
github glimmerjs / glimmer.js / packages / @glimmer / ssr / src / serializing-builder.ts View on Github external
getBuilder(env: Environment): ElementBuilder {
    return serializeBuilder(env, this.cursor);
  }
}

@glimmer/node

MIT
Latest version published 1 month ago

Package Health Score

77 / 100
Full package analysis

Similar packages