Firebugのコンソールをクロムないエラーをスロー:IEでIEでjquery.jsとモジラでエラーなく
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost:30326/Scripts/jquery-1.6.4.js :: anonymous :: line 6570" data: no]
エラーが以下与えられるライン6570に来ている:
if ((computedStyle = defaultView.getComputedStyle(elem, null))) {
エラーが
私はjavascriptやjqueryののデバッグについて全く分からない「そのようなインタフェースがサポートされていない」されています...
はEDIT
のTx ...、Arnab
を、これが起こる可能性がなぜ任意のアイデアを、このエラーを見た誰もが持っている: にも何か他のものを見つけました。これはjqueryのメソッド..ですif (document.defaultView && document.defaultView.getComputedStyle) {
getComputedStyle = function (elem, name) {
var ret, defaultView, computedStyle;
name = name.replace(rupper, "-$1").toLowerCase();
if (!(defaultView = elem.ownerDocument.defaultView))
{ return undefined;
}
if ((computedStyle = defaultView.getComputedStyle(elem, null))) {
// は、[エラーがelemは値を投げます場所です「」です]
ret = computedStyle.getPropertyValue(name);
// **[The value of name is opacity]**
if (ret === "" && !jQuery.contains(elem.ownerDocument.documentElement, elem)) {
ret = jQuery.style(elem, name);
}
}
return ret;
};
}
しかし、私はその方法から見つけることができませんでした
if (elem.wholeText == " " && name == "opacity") {
return "1";
}
if ((computedStyle = defaultView.getComputedStyle(elem, null)))
:鉱山の、jqueryの中にこのメソッドが呼び出され、誰でもスクリプトがページ
ソリューションで焼成されているJS順序を見つける方法を知っています
場合は基本的に((computedStyle = defaultView.getComputedStyle(elemは、NULL)))ライン 上記のコードを追加する方法を示すためにジャスティンに
おかげで....
*あなたのコードの関連する行を投稿してください。このためにjsfiddleを使用することができます。 –
txは、jqueryが呼び出されている元を見つけようとします。 – Arnab
それは私に起こりました。getComputedStyleコールの周りにtry-catchを置いて、これを得ました:[注意:ELEMはNULLではありません(NS_ERROR_FAILURE) "nsresult:" 0x80004005(NS_ERROR_FAILURE) "場所:" JSフレーム:: http:// localhost:35973/scripts /jquery-1.9.1.js :: getStyles :: line 6927 "data:no" getStyles(elem = undefined)jquery-1.9.1.js(行6929) curCSS(elem = Object {element = g.highcharts -series、renderer = {...}、attrSetters = {...}、more ...}、name = "Webk ..." – Bakhshi