The kickflip() custom element name should be optional.
treshugart opened this issue · 4 comments
treshugart commented
If it is optional, kickflip()
should return a function that accepts a name which will return a constructor.
This should still be supported:
const MyElement = kickflip('my-element', {
render () {}
});
However we should support this:
const defineMyElement = kickflip({
render () {}
});
const MyElement = defineMyElement('alternate-name');
seancurtis commented
Looks good. Will this mean we can create 2 elements using the same base, but override/extend one of them without affecting the other?
treshugart commented
Looks good. Will this mean we can create 2 elements using the same base, but override/extend one of them without affecting the other?
Yep. Basically, it becomes a factory to create a specific type of element.
treshugart commented
This may actually be better going into Skate?
treshugart commented
Closing as this should be implemented in Skate proper.