Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 8939 by dan.pupius: The event object passed to window.onerror  
does not contain an error message, url or line number.
http://code.google.com/p/chromium/issues/detail?id=8939

Chrome Version       : 2.0.169.1
URLs (if applicable) : http://endoflow.com/scratch/onerror.html
Other browsers tested:
   Add OK or FAIL after other browsers where you have tested this issue:
      Safari 3: Not tested
     Firefox 3: OK
          IE 7: OK

What steps will reproduce the problem?
Trigger window.onerror, which is harder than it should be since it is  
impossible to catch many types of
exception.  See https://bugs.webkit.org/show_bug.cgi?id=8519.  Writing a  
script tag with a bad URL is
one way to do it.

What is the expected result?
Firefox and IE pass the error message, url, and line number to  
window.onerror.  Chrome previously did
the same.

What happens instead?
With 2.0 it passes an event object, but doesn't seem to expose the above  
information.  Though in this
case we can inspect the srcElement to get the URL.  The event object has  
the following members:

   timeStamp: Wed Mar 18 2009 14:31:56 GMT-0700 (Pacific Daylight Time)
   target: [object HTMLScriptElement]
   eventPhase: 3
   returnValue: true
   srcElement: [object HTMLScriptElement]
   cancelBubble: false
   clipboardData: undefined
   currentTarget: [object HTMLDocument]
   cancelable: false
   bubbles: true
   type: error
   stopPropagation: function stopPropagation() { [native code] }
   preventDefault: function preventDefault() { [native code] }
   initEvent: function initEvent() { [native code] }
   CAPTURING_PHASE: 1
   AT_TARGET: 2
   BUBBLING_PHASE: 3
   MOUSEDOWN: 1
   MOUSEUP: 2
   MOUSEOVER: 4
   MOUSEOUT: 8
   MOUSEMOVE: 16
   MOUSEDRAG: 32
   CLICK: 64
   DBLCLICK: 128
   KEYDOWN: 256
   KEYUP: 512
   KEYPRESS: 1024
   DRAGDROP: 2048
   FOCUS: 4096
   BLUR: 8192
   SELECT: 16384
   CHANGE: 32768



--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to