Google Chrome仍然支持HTML导入吗? [英] Is HTML Import still supported in Google Chrome?

查看:276
本文介绍了Google Chrome仍然支持HTML导入吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 http://blog.teamtreehouse.com/introduction-html-imports

要在Chrome中启用HTML导入,请转到chrome://flags并启用启用HTML导入"标志.完成后,请点击屏幕底部的立即重新启动按钮,以重新启动支持HTML导入的Chrome.

To enable HTML imports in Chrome, go to chrome://flags and enable the Enable HTML Imports flag. Once you’re done, click the Relaunch Now button at the bottom of the screen to restart Chrome with support for HTML imports.

但是我无法在最新版本的Google Chrome标志中找到它

But I can't find it in latest version of Google Chrome flags

推荐答案

HTML导入是在中本地实现的Chrome,Opera和Android .

它仍然是 W3C工作草案.

对于其他浏览器,您可以使用:

For other browsers, you can use:

  • the webcomponentsjs polyfill,
  • or directly the file html-imports.min.js from HTML Imports.

更新2019

HTML导入将不被本地支持.另一个解决方案:

HTML Imports won't be supported natively after Chrome 73. You should then use another solutions:

  • polyfill
  • 备用模块加载器,
  • JS import模板文字,
  • 通过fetch()直接下载.
  • the polyfill,
  • an alternate module loader,
  • JS import combined with template literals,
  • a direct download with fetch().

更新2020

已完全删除了HTML导入.

HTML Imports were definitvely removed.

这篇关于Google Chrome仍然支持HTML导入吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆