Polymer 和 Web Components polyfill 之间的区别?
Difference between Polymer and Web Components polyfill?
我是一名新开发人员,我找不到任何可以清楚地识别 Polyfill 和 Polymer 之间差异的内容。
我相当确定 Polyfill 是分开的 of/or 使用 platform.js webcomponents.js 这反过来又是大多数浏览器的一部分一直在使用以确保可以使用尚未完全支持的 Web 组件。 Polymer 使用某种类似于 Angular 指令的模板,但它似乎是未来网络的更永久固定装置。
任何人都可以提供更明确的定义或 link 阐明两者之间的区别吗?
Polymer 是否基于 polyfill?
"Polymer sprinkles a bit of sugar over the standard Web Components APIs, making it easier for you […]."
—
Polymer Project homepage
"Polymer supports all major evergreen browsers and when combined with webcomponents.js supports IE 11+."
—
A Quick Introduction To Polymer
(with emphasis addded by me)
这意味着 Polymer 不基于,即不依赖于 polyfill (webcomponents.js)。相反,它似乎直接构建在 Web 组件标准之上。
只有当您的目标浏览器不执行这些标准时,您才需要 polyfill 来弥补。
Polymer 和 polyfill 的主要区别:
"There are a few wrappers around web components […]. Polymer is a similar wrapper with a few extra goodies thrown in on top.
[…]
One of the advantages of using Polymer is that it has a built in data binding model (like Angular) enabling complete applications to be made without any other libraries."
—
ibid
(with emphasis added by me)
这意味着,虽然 Webcomponents.js(polyfill)是缺失功能的替代品,但 Polymer 是围绕它的薄包装(添加了一些功能)。
我是一名新开发人员,我找不到任何可以清楚地识别 Polyfill 和 Polymer 之间差异的内容。
我相当确定 Polyfill 是分开的 of/or 使用 platform.js webcomponents.js 这反过来又是大多数浏览器的一部分一直在使用以确保可以使用尚未完全支持的 Web 组件。 Polymer 使用某种类似于 Angular 指令的模板,但它似乎是未来网络的更永久固定装置。
任何人都可以提供更明确的定义或 link 阐明两者之间的区别吗?
Polymer 是否基于 polyfill?
"Polymer sprinkles a bit of sugar over the standard Web Components APIs, making it easier for you […]." — Polymer Project homepage
"Polymer supports all major evergreen browsers and when combined with webcomponents.js supports IE 11+." — A Quick Introduction To Polymer (with emphasis addded by me)
这意味着 Polymer 不基于,即不依赖于 polyfill (webcomponents.js)。相反,它似乎直接构建在 Web 组件标准之上。
只有当您的目标浏览器不执行这些标准时,您才需要 polyfill 来弥补。
Polymer 和 polyfill 的主要区别:
"There are a few wrappers around web components […]. Polymer is a similar wrapper with a few extra goodies thrown in on top. […] One of the advantages of using Polymer is that it has a built in data binding model (like Angular) enabling complete applications to be made without any other libraries." — ibid (with emphasis added by me)
这意味着,虽然 Webcomponents.js(polyfill)是缺失功能的替代品,但 Polymer 是围绕它的薄包装(添加了一些功能)。