firebug

Find attached / bound events of an element using Chrome Development Tools / Firebug / IE Developer Toolbar

十年热恋 提交于 2019-11-27 06:48:35
When inspecting a page's DOM, I would like to know the attached event(s) of an element quickly For example, if a button has this HTML DOM <button id="button1">Click Me</button> And somewhere (not in a place that I know in advance) it has an event attached, e.g. $("#button1").click(function(){...}); I know it can be done programatically ( Can I find events bound on an element with jQuery? ) but is there a way using just one of the developer tools for Chrome / Firefox / IE to see a list of events? Update : I found out that in the newer Chrome versions I have a tab called EventListeners but it

How to debug Greasemonkey script with the Firebug extension?

假装没事ソ 提交于 2019-11-27 06:43:51
I didn't find a way to debug Greasemonkey scripts with the Firebug extension. Does anyone know how to do this ? Thanks. Brock Adams Updatier: The Mene+Shuman fix now is busted with Firefox 30 and Firebug 2. Firefox 31 may provide workarounds (will investigate). In the meantime, use the "General workaround strategies" listed below. Update: This answer is now obsolete. If you open about:config and set extensions.firebug.filterSystemURLs to false then you can use Firebug to debug the Greasemonkey script just like any other. This works irregardless of the @grant mode. See Mene's answer -- with an

What are the alternatives to the Firefox Developer Tools?

北城余情 提交于 2019-11-27 06:42:47
问题 Since last few updates of Firefox our beloved Firebug is integrated into the Firefox Developer Tools and a lot of people including me don't like what happened to Firebug. The built-in developer tools have a very ugly menu system and messed up usability. So, what are the alternatives to the Firefox Developer Tools? Is there a tool with the same usability as Firebug? 回答1: Alternatives are: Turn off multi-process Firefox. (Though that's only a temporary solution and doesn't bring back all

Understanding Firebug profiler output

喜欢而已 提交于 2019-11-27 06:30:21
I've been trying to use Firebug's profiler to better understand the source of some JavaScript performance issues we are seeing, but I'm a little confused by the output. When I profile some code the profiler reports Profile (464.323 ms, 26,412 calls) . I suspect that the 464.323 ms is the sum of the execution time for those 26,412 calls. However, when I drill down into the detailed results I see individual results with an average execution time greater than 464.323 ms, e.g. the result with the highest average time reports the following details: Calls: **1** Percent: **0%** Own Time: **0.006 ms*

Testing for console.log statements in IE [duplicate]

眉间皱痕 提交于 2019-11-27 06:10:26
Possible Duplicate: 'console' is undefined error for internet explorer If you have console.log statements in your code, Internet Explorer will throw a JavaScript error (at least in IE7 which is what our intranet users have installed). I am using Firefox for most of my development testing primarily because of the functionality provided by Firebug (where I use a lot of console statements) but I also need to test in IE. if I add the following to my JavaScript, the error does not get thrown. var debugging = false; if (typeof console == "undefined") var console = { log: function() {} }; The problem

“element.dispatchEvent is not a function” js error caught in firebug of FF3.0

此生再无相见时 提交于 2019-11-27 05:24:20
问题 i am getting the following error while loading my index page in FF3.0. Sorry, i am unable to paste the script here as it is 2030 lines of code. element.dispatchEvent is not a function On expansion it gives me below things, fire()()prototype.js?1 (line 3972) _methodized()()prototype.js?1 (line 246) fireContentLoadedEvent()prototype.js?1 (line 4006) [Break on this error] element.dispatchEvent(event); element.dispatchEvent(event); is in line 3972 of prototype.js. I am including prototype.js

Error: “Access to restricted URI denied”

*爱你&永不变心* 提交于 2019-11-27 05:18:17
Access to restricted URI denied" code: "1012 [Break On This Error] xhttp.send(null); function getXML(xml_file) { if (window.XMLHttpRequest) { var xhttp = new XMLHttpRequest(); // Cretes a instantce of XMLHttpRequest object } else { var xhttp = new ActiveXObject("Microsoft.XMLHTTP"); // for IE 5/6 } xhttp.open("GET",xml_file,false); xhttp.send(null); var xmlDoc = xhttp.responseXML; return (xmlDoc); } I'm trying to get data from a XML file using JavaScript. Im using Firebug to test and debug on Firefox. The above error is what I'm getting. It works in other places i used the same before, why is

Javascript: Let user select an HTML element like Firebug?

瘦欲@ 提交于 2019-11-27 05:00:34
问题 I want to write a browser (Chrome/FF) extension that needs to select an element on a web page. I would like it to behave like Firebug's element inspector does. You click the inspect arrow and you can then hover/highlight elements. When you click on the element you want, the element is inspected. I'm just interested in the code to allow a user to select an element - not in actually inspecting it or anything similar. Because I'm writing an extension, it might be nice if you could provide non

Equivalent of Firebug's “Copy XPath” in Internet Explorer?

本秂侑毒 提交于 2019-11-27 04:32:55
I have an Internet Explorer only web application. I'm exploring what we can do to automate the testing. Selenium looks like a good tool, but to be able to activate links etc. I need to tell it where they are. The application wasn't built with this kind of testing in mind, so there generally aren't id attributes on the key elements. No problem, I think, I can use XPath expressions. But finding the correct XPath for, say, a button, is a royal pain if done by inspecting the source of the page. With Firefox / Firebug, I can select the element then use "Copy XPath" to get the expression. I have the

How to call a function inside $(document).ready

你。 提交于 2019-11-27 04:29:31
问题 Im trying to debug my web app that uses jQuery. In firebug im calling functions inside the $(document).ready.. function val() { console.log('validated outside doc.ready'); } $(document).ready(function() { console.log('document ready...'); function validate() { console.log('validated!'); } } In firebug console I type validate() and it says its not a function If i type val() it works fine. How do i call validate from the console ? 回答1: You are not calling a function like that, you just define