T
T
test22352018-01-21 14:33:56
HTML
test2235, 2018-01-21 14:33:56

What is the purpose of the global slot attribute in the HTML specification?

I don't understand why the global slot attribute is needed in the HTML specification? What does it do, how does it work? https://www.w3.org/TR/dom41/#nodes-shadow-tree-slots

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
monochromer, 2018-01-21
@test2235

The slot specifies places in the component template that can be redefined. For example, there is a common component - a modal window, but you need to control the number of buttons in the footer, the content in the header and in the body. If you are familiar with the Jade/Pugblock templating engine , then this is about the same. Slot example - https://codepen.io/monochromer/pen/jYdewM?editors=1000

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question