Re: [w3c/webcomponents] Named slots and the slot attribute requirement (#726)

> Sure, but I was curious what the hard-coded handling looked like in C++, and whether it would make sense to expose hooks that would allow similar JS code to be inserted in the appropriate places?

Here is hard coding.
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/SlotAssignment.cpp?l=22

This can be considered as a kind of *imperative* APIs. If we would expose, web developers have to provide a function hook for a shadow root (or for the definition of a custom element), as such: 

```javascript
function canBeAssigned(host_child, internal_slot) {
  // ...
  return true | false;
}
```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/726#issuecomment-367561902

Received on Thursday, 22 February 2018 04:13:07 UTC