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

WebComponents那些事儿 #259

Open
FrankKai opened this issue May 12, 2022 · 1 comment
Open

WebComponents那些事儿 #259

FrankKai opened this issue May 12, 2022 · 1 comment

Comments

@FrankKai
Copy link
Owner

  • webcomponents-sd.js, webcomponents-cs.js, custom-elements-es5-adaptor.js是什么?
@FrankKai
Copy link
Owner Author

FrankKai commented May 12, 2022

webcomponents-sd.js, webcomponents-cs.js, custom-elements-es5-adaptor.js是什么?

web components的polyfill。

webcomponents-sd.js

sd(Shady DOM ) polyfill

webcomponents-ce.js

ce(Custom Elements) polyfill

custom-elements-es5-adaptor.js

Custom Elements es5适配器。

根据规范,只有 ES6 class可以传递给原生 customElements.define API。因此这是为了兼容不支持es6 class的浏览器去使用web components的polyfill。

polyfill仓库:https://github.com/webcomponents/polyfills

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant