哪种 HTML5 形式的 javascript polyfill 具有最广泛的功能和浏览器范围?

发布于 2024-12-26 06:51:43 字数 475 浏览 7 评论 0原文

HTML5 中的新表单属性和标签非常棒。不幸的是,Chrome 和 Firefox 中对这些的支持有限,IE9 及更低版本中基本上不支持这些。

我研究过使用 Modernizr 和 HTML5 polyfills 在缺乏本机支持的浏览器中填充此功能。然而,似乎有大量的 HTML5 表单功能的填充,例如 webshims lib、webforms2 和 h5f(例如,参见 https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills),我不确定我应该花时间学习哪一个或哪些。

在 HTML5 功能和浏览器覆盖范围方面,哪一个 HTML5 表单 Polyfill 能够为我提供最广泛的覆盖范围?

The new forms attributes and tags in HTML5 are great. Unfortunately, there is only limited support for these in Chrome and Firefox, and essentially no support of these in IE9 and below.

I have investigated using Modernizr and HTML5 polyfills to polyfill this functionality in browsers lacking native support. However, there seems to be a large number of polyfills for HTML5 forms functionality, such as webshims lib, webforms2 and h5f (see for example the listing at https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills) and I am not sure which one or ones I should invest the time in learning.

Which one of these HTML5 forms polyfills would give me the broadest coverage in terms of HTML5 features and browser coverage?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没企图 2025-01-02 06:51:43

我使用过 Webshims Lib 并喜欢它,因为:

  • 它运行“更轻量级”如果浏览器本身支持更多 HTML5 表单功能(当然,这应该可以做任何好的填充)。
  • 在所有情况下,您都可以简单地使用 HTML5 表单的声明性标记(属性)。
  • 该项目似乎比其他项目更有“活力”。

顺便说一句,Webshims 创建者在 stackoverflow 上非常令人信服地回答了另一个问题: html5带有填充的表单 - 值得吗?

I have used Webshims Lib and like it because:

  • It runs 'more lightweight' if a browser supports more HTML5 form features natively (which, of course, should do any good polyfill).
  • You can simply use the declarative markup (attributes) of HTML5 forms in all cases.
  • The project seems to be more 'alive' than others.

By the way, the Webshims creator answered another question on stackoverflow quite convincingly: html5 forms with polyfills - is it worth it?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文