javascript getAttributeNode() 和 getAttributeNodeNS() 警告
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7789847/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
getAttributeNode() and getAttributeNodeNS() warnings
提问by heron
My page opens properly but in FF I'm continuously getting warning
我的页面可以正常打开,但在 FF 中我不断收到警告
[10:44:54.904] Use of getAttributeNode() is deprecated. Use getAttribute() instead. @ http://localhost/admin/?page=add#
[10:46:23.828] Use of getAttributeNodeNS() is deprecated. Use getAttributeNS() instead. @ http://localhost/admin/?page=add
Btw i'm using CKeditor. What does mean that warning? and how to fix it?
顺便说一句,我正在使用 CKeditor。这个警告是什么意思?以及如何解决它?
回答by Tim Down
Those two methods are deprecated in Firefox 7 because they have been removed in DOM4, the current version of the DOM spec. It is likely that eventually they will be removed from Firefox and possibly other browsers.
这两种方法在 Firefox 7 中已被弃用,因为它们已在 DOM4(DOM 规范的当前版本)中删除。很可能最终它们将从 Firefox 和可能的其他浏览器中删除。
If the warnings are coming from CKEditor code, I'm sure the CKEditor team will be aware of this and release an update at some point that does not use these methods. However, I couldn't find any use of this method in CKEditor's source code, so it's more likely to be coming from something else you're including on your page. Possibly CKFinder, which does seem to use that method?
如果警告来自 CKEditor 代码,我相信 CKEditor 团队会意识到这一点,并在某个时候发布不使用这些方法的更新。但是,我在 CKEditor 的源代码中找不到任何使用此方法的方法,因此它更有可能来自您在页面上包含的其他内容。可能是 CKFinder,哪个似乎使用该方法?
回答by AlfonsoML
It seems to me that it's an internal problem in Firefox, at least one of the warnings is fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=690120so we just have to wait and test with the new Firefox versions :-)
在我看来,这是 Firefox 的内部问题,至少有一个警告已在https://bugzilla.mozilla.org/show_bug.cgi?id=690120 中修复,所以我们只需要等待并使用新的 Firefox 进行测试版本:-)
回答by paarth
Use of getAttributeNode()
is deprecated. Use getAttribute()enter code here
instead. @ http://localhost/admin/?page=add#
使用的getAttributeNode()
是过时了。请改用 getAttribute() enter code here
。@ http://localhost/admin/?page=add#
Use of getAttributeNodeNS()
is deprecated. Use getAttributeNS()
instead. @ http://localhost/admin/?page=add
使用的getAttributeNodeNS()
是过时了。使用getAttributeNS()
来代替。@ http://localhost/admin/?page=add