How to use the @aurelia/jit.TextSymbol function in @aurelia/jit

To help you get started, we’ve selected a few @aurelia/jit 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 aurelia / aurelia / packages / jit-html / dist / index.es6.js View on Github external
bindText(node) {
        if (Tracer.enabled) {
            Tracer.enter('TemplateBinder', 'bindText', slice.call(arguments));
        }
        const interpolation = this.exprParser.parse(node.wholeText, 2048 /* Interpolation */);
        if (interpolation != null) {
            const symbol = new TextSymbol(this.dom, node, interpolation);
            this.manifest.childNodes.push(symbol);
            processInterpolationText(symbol);
        }
        while (node.nextSibling != null && node.nextSibling.nodeType === 3 /* Text */) {
            node = node.nextSibling;
        }
        if (Tracer.enabled) {
            Tracer.leave();
        }
        return node;
    }
    declareTemplateController(attrSyntax, attrInfo) {
github aurelia / aurelia / packages / jit-html / src / template-binder.ts View on Github external
private bindText(node: Text): ChildNode {
    const interpolation = this.exprParser.parse(node.wholeText, BindingType.Interpolation);
    if (interpolation != null) {
      const symbol = new TextSymbol(this.dom, node, interpolation);
      this.manifest!.childNodes.push(symbol);
      processInterpolationText(symbol);
    }
    while (node.nextSibling != null && node.nextSibling.nodeType === NodeType.Text) {
      node = node.nextSibling as Text;
    }
    return node;
  }