Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support declarative custom elements #91

Open
kethinov opened this issue Feb 5, 2017 · 0 comments
Open

Support declarative custom elements #91

kethinov opened this issue Feb 5, 2017 · 0 comments
Assignees
Labels

Comments

@kethinov
Copy link
Member

kethinov commented Feb 5, 2017

The web standard for custom elements doesn't support a declarative way of creating them entirely from within markup. https://www.html5rocks.com/en/tutorials/webcomponents/customelements/

I propose Teddy should support something like:

<template registerElement='x-foo'>
  <p>sample markup structure</p>
  <p>${varname} or {varname}</p>
</template>

If that markup is parsed by Teddy, then it becomes possible to use the custom element <x-foo> like so:

<x-foo varname='hello world'></x-foo>

Or:

<x-foo>
  <varname>hello world</varname>
</x-foo>

Resulting in the following rendered template:

<p>sample markup structure</p>
<p>hello world</p>

This should probably be done separately from teddy as a polyfill for some declarative web component W3C spec, then included in Teddy.

@kethinov kethinov added enhancement Planned feature help wanted P4 Low Priority labels Feb 5, 2017
@kethinov kethinov removed the P4 Low Priority label Mar 21, 2017
@kethinov kethinov self-assigned this Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant