找到警告源的最佳方法:传递给getElementById()的空字符串 [英] Best way to locate source of Warning: Empty string passed to getElementById()

查看:292
本文介绍了找到警告源的最佳方法:传递给getElementById()的空字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


警告:传递给getElementById()的空字符串。

源文件:chrome://browser/content/browser.xul

行: 0

Warning: Empty string passed to getElementById().
Source File: chrome://browser/content/browser.xul
Line: 0

前几天我开始在开发我的网站时收到上述消息。事情正在发挥作用(或者至少我认为它们是),但我想知道它来自何处。我使用jQuery,所以不要直接使用 getElementById()。另外我还有Firebug和用于Firefox运行的Web Developer扩展。

Some days ago I started getting the above message while developing my site. Things are working as they should (or at least I think they are), but I want to find out where this is coming from. I use jQuery so do not use getElementById() directly. Plus I have Firebug and the Web Developer extension for Firefox running.

我可能费力地输入代码来检查是否给jQuery选择一个空字符串或者可能会查看jQuery本身,但我的技能很少,所以我在这里问是否有人有一个好主意快速找到警告信息的来源。

I could laboriously put in code to check for an empty string being given to a jQuery selection or maybe look into jQuery itself, but my skills are minimal, so I'm asking here if anyone has offhand a good idea for quickly locating the source of the warning messages.

推荐答案

Source File: chrome://browser/content/browser.xul

这意味着错误发生在Firefox扩展程序中,而不在您的代码中。

This means that the error is in a Firefox extension, not in your code.

这篇关于找到警告源的最佳方法:传递给getElementById()的空字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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