Re: [heycam/webidl] Consider adding support in WebIDL for defining template tags (#631)

Slightly off-topic for webidl, but since you tagged me: I think the most interesting future direction is for JS to allow host-defined tags that are _not identifiers_ so that the host can switch parsers for the template literal contents before evaluating any JS.

We're running out of syntactic space, but imagine that:

```js
let title = (text) => #html`<h1>${text}</h1>`;
```

invoked the host-defined parser for `#html` at parse time, and at eval time invoked the associated host-defined tag function, but instead of a template object as the first argument, the first argument is an object produced by the host-defined parser.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/631#issuecomment-458806109

Received on Wednesday, 30 January 2019 04:18:38 UTC