聚合物HTML导入已弃用 [英] Polymer HTML Imports Deprecated

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

问题描述

所以我刚刚开始使用聚合物并收到以下消息:

  [弃用]从样式表定义主文档在HTML Imports中,
已被弃用,计划在M65中移除,大约在2018年3月左右。请
参考.......以获取可能的迁移路径。

在做了一些阅读后,似乎是这样的:

 < link rel =importhref =/ SOR / bower_components / paper-input / paper-input.html> 

导致问题并且rel = import for html被弃用。这是正确的吗?如果是这样的话,我该怎么做?



干杯

解决方案因此,根据新版本的Chrome(61.xx.x)。谷歌已经决定从HTML Imports
中定义的样式表中设置样式主文档不是一个好方法,所以它在未来的chrome版本中将无法做到。



因此,我们必须升级到版本2.x



谷歌已经决定 HTML导入将来会被删除。这更令人沮丧。每个使用Polymer 1.x或2.x的人都必须将他们的项目更新到更新版本的聚合物(至少3.x)。不幸的是,3.x版本在所有主流浏览器中都没有支持(Chrome除外,但没有完全支持)。所以我们只能希望不会很快删除HTML导入。



对我来说,这真的是一块s ** t。我有许多用Polymer编写的项目,我无法升级它们。 (没有时间),即使我有时间,我也不信任Google Polymer ......他们的支持是0,他们甚至都没有回答错误。旧版本已停止更新。没有长期的支持版本。

正式讨论: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/VZraFwqnp9Y/discussion


So I've just got started with polymer and got this message:

[Deprecation] Styling master document from stylesheets defined in HTML Imports 
is deprecated, and is planned to be removed in M65, around March 2018. Please 
refer to ....... for possible migration paths.

After doing some reading it seems to be that

<link rel="import" href="/SOR/bower_components/paper-input/paper-input.html">

Was causing the issue and rel=import for html was being deprecated. Is this right? If so what is the fix, how should I be doing this?

Cheers

解决方案

So, according to the new version of chrome (61.xx.x). Google has made a decision that Styling master document from stylesheets defined in HTML Imports is not a good approach and so it will be unable to do in future chrome versions.

Because of this, we have to upgrade to version 2.x

Well, nothing much interesting except that Google has made a decision that HTML imports will be removed in future. This is much more frustrating. Everyone who is using Polymer 1.x or 2.x will have to update their projects to newer version of polymer (at least 3.x). Unfortunately version 3.x has no support in all major browsers (except Chrome, but not fully). So we can only hope that the remove of HTML imports will not be soon.

For me this is really piece of s**t. I have many projects written in Polymer and I am not able to upgrade them. (there is no time for this) even i had time, I don't have trust in Google Polymer... Their support is 0. They don't even answer to bugs. Old versions are already stopped from updating. No long-term support versions.

official discussion: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/VZraFwqnp9Y/discussion

这篇关于聚合物HTML导入已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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