使用HTML链接rel导入HTML文档 [英] Import HTML document using HTML link rel

查看:128
本文介绍了使用HTML链接rel导入HTML文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用

<link rel="import" href="my-tabs.html">

但它似乎不起作用。

我正在使用Chrome 28关注此演示文稿 ,我在中启用了这两个标志:flags

I am following this presentation, using Chrome 28, and I have enabled these two flags in about:flags:

Enable experimental WebKit features
Enable experimental JavaScript

我错过了什么?或者是否需要另外一个标志才能获得它?

Am I missing something? or is there another flag I need to enable to get it?

推荐答案

HTML Imports仅在Chrome Canary本地工作(甚至在那里他们只是半生不熟)。对于该演示文稿,Eric使用名为 Polymer 的项目,该项目为HTML Imports(以及其他内容)提供了polyfill。检查一下!

HTML Imports only work natively in Chrome Canary (and even there they're only half-baked). For that presentation, Eric uses a project called Polymer, which provides a polyfill for HTML Imports (among other things). Check it out!

更新:Chrome Canary中甚至无法使用HTML Imports的当前部分实现。它的标志设置仅转向它用于测试(不是构建)。它甚至不是中关于:flags 的选项。

Update: The current partial implementation of HTML Imports isn't even available in Chrome Canary. Its flag is set to only turn it on for tests (not builds). It's not even an option in about:flags yet.

再次更新: 现在 中有一个关于:flags 的标志。它被称为启用HTML Imports 。不确定它到底发生了什么。我已经在Linux上的Chrome 32.0.1671.3 dev中获得了它。

Update again: Now there's a flag in about:flags. It's called Enable HTML Imports. Not sure exactly when it came about. I've got it in Chrome 32.0.1671.3 dev on Linux.

这篇关于使用HTML链接rel导入HTML文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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