Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持IE11的slot处理和ssr吗 #4

Open
chenyulun opened this issue May 13, 2021 · 2 comments · Fixed by #17
Open

支持IE11的slot处理和ssr吗 #4

chenyulun opened this issue May 13, 2021 · 2 comments · Fixed by #17
Labels
help wanted Extra attention is needed

Comments

@chenyulun
Copy link

支持slot低版本和ssr处理吗

@TechQuery
Copy link
Member

  1. Web Components 官方 polyfill 对 IE 11 <slot /> 的支持貌似还有问题:https://stackoverflow.com/questions/66393616/angular11-webcomponents-polyfills-ie11-nojoy
  2. SSR 的支持我正在研究标准提案https://web.dev/declarative-shadow-dom/

@TechQuery TechQuery added the help wanted Extra attention is needed label Aug 1, 2021
@TechQuery TechQuery added this to To do in Upgrade & Refactor Feb 2, 2022
@TechQuery
Copy link
Member

新标准 ElementInternals 提供了对 <template shadowRootMode="open" /> 的支持,因此 WebCell v3 基于此提供了对 SSR 的组件引擎级支持:

internals = this.attachInternals();
renderer = new DOMRenderer();
get root(): ParentNode {
return this.internals.shadowRoot || this;
}
constructor() {
super();
if (meta.mode && !this.internals.shadowRoot)
this.attachShadow(meta as ShadowRootInit);

但还需要类似 Next.js 这样的开发框架来输出符合新标准的 HTML 代码。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Upgrade & Refactor
  
In progress
Development

Successfully merging a pull request may close this issue.

2 participants