-
Notifications
You must be signed in to change notification settings - Fork 1
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 that are not registered custom elements #73
Comments
Could make a name for elements that weren't registered with a name themselves. |
I've been wanting this feature forever with the old These would be local references only right? i.e. you could literally just make up a temporary name, provided it's free of conflict. E.g. Anything GUID or unique incrementing ID. |
yeah, a guid might work. A unique incrementing ID could be more likely to conflict (say there were multiple versions of canjs). I also like @matthewp 's idea of CanJS having some sort of I like having something like |
Not only that, but you could have a generic There is also a strong parallel here with the construction of components over regular HTML tags, where the So how about: To work, all it needs is to register a generated name, and shim an additional layer of class extend around the component, which makes it inherit from the element type you're linking in onto. (That would be iirc And then for generic 'don't care what tag it uses' components, use a generic E.g. class MyTabs extends StacheElement {}
class MyAll extends StacheElement {
static view = `<my-tabs>`
static components = { MyTabs }
} And the resulting DOM will be something like |
I'd like to discuss ways of creating custom elements that are not registered custom elements. I know there are a lot of problems with this, but I'd like to do something similar to the following:
How could we make something like this work?
Could we mount behavior to an
UnknownHTMLElement
like<my-tabs>
?The text was updated successfully, but these errors were encountered: