custom-elements-manifest icon indicating copy to clipboard operation
custom-elements-manifest copied to clipboard

Is WebComponent a Container for other Elements (low prio)

Open jogibear9988 opened this issue 3 years ago • 6 comments

We should also have a configuration to tell if a WebComponent is a container for other elements (maybe a array of querySelectors wich define possible elements)

jogibear9988 avatar Jun 01 '21 08:06 jogibear9988

This is needed for a good designer experience, so I know if I could drag other components into

jogibear9988 avatar Jun 01 '21 08:06 jogibear9988

How is this different from slots?

thepassle avatar Jun 01 '21 08:06 thepassle

Not every custom element uses slots

jogibear9988 avatar Jun 01 '21 08:06 jogibear9988

Then im not sure what you mean. Can you provide some more information/context and some code examples, and a proposal of what you'd like to happen in the schema?

thepassle avatar Jun 01 '21 11:06 thepassle

Okay, maybe we also could use the the empty slot. But then the empty slot is mandatory, means if it is not there the element is not allowed to have children

jogibear9988 avatar Jun 02 '21 05:06 jogibear9988

or we do something like this uses #46

   {
        name: "",
        allowedChildren: [":not(*)"]
    }

jogibear9988 avatar Jun 02 '21 05:06 jogibear9988