Re: [w3c/webcomponents] Add Declarative Shadow DOM strawman proposal (#731)

@matthewp just to be clear, you have only few options:

1. get your server to produce the formal composition, e.g.:

```html
<fancy-content>
     <p>some content that goes inside the default slot</p>
</fancy-content>
```

in which case the output will be incomplete until those elements are upgraded, they will be missing the styles, and it will exhibit a very weird flickering effect once those elements get upgraded and new stuff become visible.

2. get your server to produce something equivalent to the real output:

```html
<fancy-content>
     ... style and stuff... from the shadow, plus slotted content! 
     <div class="fancy-border"> <!-- from shadow -->
         <p>some content that goes inside the default slot</p> <!-- slotted -->
     </div>
</fancy-content>
```

in which case, you will have big problems to solve: no real style isolation until the host is upgraded. no way to intercept the upgrade process to pick the slotted pieces right before the upgrade happens so the real slotting can occur. A variation of this is what you just mentioned, send `<fake-fancy-content>` instead of `<fancy-content>` and do some work before making that a `<fancy-content>` after you can guarantee that it is registered, but it happens to suffer from the same kind of problems.

either way you have to do a lot of work just to use web components. I'm not questioning whether or not someone has figured this one out, I'm sure there are folks trying, but the reality is that we should provide them the tools so this process is not as painful as it is today.

-- 
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/pull/731#issuecomment-363836427

Received on Wednesday, 7 February 2018 17:01:57 UTC