developit / developit/preact-shadow-root

Support Preact X

未关闭
#6 2 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
73
派生
6
PR 合并指标
30 天内没有已合并 PR

描述

- `this.base` is `undefined` at `componentDidMount`, so `this.shadow` never gets initialized.
- `props.children[0]` is `undefined`, since `children` isn’t always an array anymore.
- The third argument to `render()` should be removed, as per the Preact X upgrade docs.

I run the following replacements on my bundle as a workaround:

```js
// Hacks to make `preact-shadow-root` work with Preact 10.
"this.base&&this.base.parentNode": "this.__P",
"o.children[0],": "o.children,",
"this.shadow.firstChild": "undefined",
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。