Closed
Bug 10573
Opened 25 years ago
Closed 24 years ago
onerror function doesn't work like it does for 4.x
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: slogan, Assigned: joki)
Details
I added the file onerror.js tonight, but it doesn't work like it does in 4.x. This code came from Danny Goodman's JavaScript Bible, and should display a dialog when it encounters an error in JS code. But it doesn't. To add the js file to a xul file, try <html:script language="JavaScript" src="resource:/res/samples/onerror.js"/>
Updated•25 years ago
|
Assignee: mccabe → rogerl
Comment 1•25 years ago
|
||
Passing this on to Roger... Roger - this could end up being something for the imbedding; I don't think the core engine has ever defined onError. But it'll likely interact with exceptions; the best compromise that I found was to have uncaught exceptions (Just when does it become uncaught? It's a puzzler...) call the onError handler. One way to do this is to have exceptions always look just like JavaScript errors always have to imbedding code that doesn't know look for an associated exception value.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Updated•25 years ago
|
Assignee: rogerl → joki
Status: ASSIGNED → NEW
Component: Javascript Engine → Event Handling
Comment 2•25 years ago
|
||
Uncaught exceptions - defined as those that make it out to the API invocation level are turned into errors (marked as having exception-al birthright). The embedding simply needs to respond to these in the same way as past JS errors. The onerror event handler does not seem to be hooked up right now, but things should just work fine when it is; I don't see any reason for the engine to get into the onerror game since the current mechanism will work fine? I'm sending the bug onto EventHandling since the initial complaint is that the onerror stuff simply doesn't work, regardless of exceptions.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M14
Updated•25 years ago
|
Summary: onerror function doesn't work like it does for 4.x → [4.xP] onerror function doesn't work like it does for 4.x
Target Milestone: M14 → M16
Comment 3•25 years ago
|
||
Moving M16.
Updated•25 years ago
|
Summary: [4.xP] onerror function doesn't work like it does for 4.x → onerror function doesn't work like it does for 4.x
Assignee | ||
Comment 6•24 years ago
|
||
Okay, I've added the onerror event as well as setting it up so that 'return true' from inside JS will surpress the error message (as opposed to 'return false' for most every other event). However, in accordance with the DOM Level 2 spec, the new proper way to accomplish this is to call event.preventDefault(). PreventDefault works consistently for all events.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 7•24 years ago
|
||
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Comment 9•24 years ago
|
||
Reassigning QA Contact for all open and unverified bugs previously under Lorca's care to Gerardo as per phone conversation this morning.
QA Contact: lorca → gerardok
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•