How to use the @glimmer/runtime.CustomJitRuntime 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.js / packages / @glimmer / application / src / loaders / runtime-compiler / loader.ts View on Github external
getComponentTemplateIterator(
    app: BaseApplication,
    env: Environment,
    builder: ElementBuilder,
    componentName: string,
    args: RenderComponentArgs,
    dynamicScope: DynamicScope
  ): Promise {
    let resolver = this.getResolver(app);
    let context = this.getContext(resolver);
    let runtime = CustomJitRuntime(resolver, context, env);

    return Promise.resolve(
      renderJitComponent(
        runtime,
        builder,
        context,
        0,
        componentName,
        args,
        dynamicScope
     )
    );
  }
github glimmerjs / glimmer.js / packages / @glimmer / application / src / loaders / runtime-compiler / loader.ts View on Github external
async getTemplateIterator(
    app: Application,
    env: Environment,
    builder: ElementBuilder,
    dynamicScope: DynamicScope,
    self: PathReference
  ): Promise {
    let resolver = this.getResolver(app);
    let context = this.getContext(resolver);
    let runtime = CustomJitRuntime(resolver, context, app.env);

    let mainLayout = unwrapTemplate(templateFactory(mainTemplate).create());
    let handle = unwrapHandle(mainLayout.asLayout().compile(context));

    return Promise.resolve(
      renderJitMain(
        runtime,
        context,
        self,
        builder,
        handle,
        dynamicScope
      )
    );
  }