How to use the @glimmer/runtime.renderAotComponent function in @glimmer/runtime

To help you get started, we’ve selected a few @glimmer/runtime 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 / modes / aot / delegate.ts View on Github external
renderComponent(
    name: string,
    args: Dict>,
    element: SimpleElement,
    dyanmicScope?: DynamicScope
  ): RenderResult {
    let bundleCompiler = this.getBundleCompiler();
    this.addRegisteredComponents(bundleCompiler);
    let compilationResult = bundleCompiler.compile();

    let cursor = { element, nextSibling: null };
    let runtime = this.getRuntimeContext(compilationResult);
    let builder = this.getElementBuilder(runtime.env, cursor);
    let iterator = renderAotComponent(
      runtime,
      builder,
      compilationResult.main,
      name,
      args,
      dyanmicScope
    );

    return renderSync(runtime.env, iterator);
  }
github glimmerjs / glimmer.js / packages / @glimmer / application / src / loaders / bytecode / loader.ts View on Github external
async getComponentTemplateIterator(
    app: BaseApplication,
    env: Environment,
    builder: ElementBuilder,
    componentName: string,
    args: RenderComponentArgs,
    dynamicScope: DynamicScope
  ): Promise {
    const runtime = await this.getRuntime(app, env);
    return renderAotComponent(runtime, builder, 0, componentName, args, dynamicScope);
  }