Skip to content

Can't bind future values outside of HTML tags #23

@dariomannu

Description

@dariomannu

Rimmel has spent a great deal of effort focusing on the most advanced use cases for templates with async/observable parts and complex structures.

Some excessively "basic" use cases have been deprioritised.
One is the case of a template containing no HTML tags that references any future (promise or observable) value.

The following doesn't work:

const deferredValue = Promise.resolve('world');

document.body.innerHTML = rml`
    Hello, ${deferredValue}
`;

It works if it's wrapped in at least an HTML tag.
A fix is required in the parser around the correspnding/relevant regular expression.

Link to reproduce

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions