Closed Bug 649799 Opened 10 years ago Closed 10 years ago

Errors in Javascript Event Handlers do not show in either the Error console or Firebug's console

Categories

(DevTools :: General, defect)

x86
All
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 503244

People

(Reporter: myers, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0) Gecko/20100101 Firefox/4.0

Javascript applications have most of their code in event handlers.  When one of these handlers have some sort of error it's important to be alerted to the fact.  Currently in Firefox an error in an event handler is not shown in the Error Console or in firebugs error console.

Why this is Critical for Firefox:

I use Firefox as my main development browser, I like it.  It's no longer telling me about errors in my code, where as other browsers are.

Reproducible: Always

Steps to Reproduce:
1. Load the above url
2. look at the Main menu > Tools > Error Console
3. Note the lack of an error.
Actual Results:  
No error.

Expected Results:  
An error is shown in the Error Console.

Here is the html source of the url I gave.

<html>
<head>
  <title>ARGH</title>
</head>

<body>

<script>
var erroringHandler = function(event) {
  alert('you should see this');
  window.monkey();
  alert('you will not see this');
};

var responder = function(event) {
  if (event.eventName == 'test:monkey') {
    erroringHandler(event);
  }
};

document.addEventListener('dataavailable', responder, false);

var event = document.createEvent('HTMLEvents');
event.initEvent('dataavailable', true, true);
event.eventName = 'test:monkey';
document.dispatchEvent(event);
</script>

</body>

</html>
duplicate 503244
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 503244
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.