我遇到了意想不到的問題。聚合物就地燃燒在IE11上,但不在Firefox或Chrome上
我有兩頁聚合物。兩者都在IE11上運行得很好,完全沒有問題(性能下降除外)。 現在,在Firefox和Chrome上,其中一個工作不正常,從未激發聚合物就緒,另一個工作正常。 如果有的話,人們會認爲IE將是一個有問題的人。
與此相關的非火行爲,唯一的聚合物分子本頁顯示FF或Chrome是主要的工具欄,並將其內部的東西,僅此而已。 我只是不知道下一步該怎麼做。
以下是標題。第一個來自工作到處的頁面,沒有問題。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes" />
<title>N-Adviser</title>
[... a bunch of element imports ...]
<script src="components/webcomponentsjs/webcomponents.js"></script>
<style shim-shadowdom>
[...some styling...]
</style>
<script src="http://code.jquery.com/jquery-1.7.js" type="text/javascript"></script>
</head>
而這裏的壞
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="headPortal" runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes" />
<title>Portal</title>
<link rel="import" href="components/font-roboto/roboto.html" />
<link rel="import" href="components/polymer/polymer.html" />
[...a bunch of element imports...]
<link type="text/css" rel="stylesheet" href="Styles/LoginStyle.css" shim-shadowdom />
<script src="components/webcomponentsjs/webcomponents.js"></script>
<style></style>
<script src="http://code.jquery.com/jquery-1.7.js" type="text/javascript"></script>
</head>
無法看到任何差別,除了一個事實,即他們中的一個外部文件,這不應該的問題進口的CSS。
他們都有自己的JavaScript代碼,所有的HTML
<script type="text/javascript">
$(document).ready(function() {
alert("docready");
});
window.addEventListener('polymer-ready', function (e) {
alert("polready");
[...]
</script>
兩個火document.ready
後,但只有第一個觸發聚合物就緒。有什麼想法嗎?
我以爲我已經測試過導入的每一個訂單,但又試着改變webcomponents.js。仍然不能正常工作,聚合物不能正常工作:/ 另外,我沒有在我的問題上說過,但是工作的頁面比另一個複雜得多,並且輸入了所有「壞」的東西,還有其他許多人。我會記住你的解釋,因爲它可能是有用的,但不是在這種情況下。 – Iskalla 2015-03-04 07:48:57
對不起,我的意思是你的解釋非常有意義,仍然不能解決問題 – Iskalla 2015-03-04 07:56:59