Closed
Bug 137519
Opened 23 years ago
Closed 22 years ago
[RFE] enabling warnings in prefs should not trigger more onerror events
Categories
(Core :: DOM: Events, enhancement)
Core
DOM: Events
Tracking
()
People
(Reporter: chris, Assigned: joki)
References
()
Details
I just got a report from a visitor to one of my sites that they saw an "error
page" based on a redirect onerror when visiting with 0.9.9. I was only able to
recreate the issue with "show strict warnings in console" enabled. The above
page was kicking out the following and tripping the onerror event:
Warning: function pnhSetInnerWidth does not always return a value
Source File: http://www.neuralust.com/~cac6982/pnhObjectLibrary/pnhWindowObject.js
Line: 25
Source Code:
}
I believe this is overkill.
1) A warning is not an error. Its a warning. There is a HUGE difference between
a browser not understanding "document.all" and noticing that a function might
not always return a value.
2) What a user chooses to see in a console should not change the path of
execution of the page's code.
3) Legacy scripts that encounter a user with setting will fail for no reason
other then their setting.
4) From a user perspective this preference is misleading, it mentions nothingn
about changing what happens on a page.
I have used the onerror event for quite some time with good success (20+ sites
over the last few years). So much success that I've even written a quick
tutorial on the subject at: http://www.chunkysoup.net/basic/breakingjs/
This is less of an issue if the Debug prefences (Like the Debug & QA Menus) are
not expected to appear in distributions, but with the current popularity of
"Mozilla The Distribution" it still really bothers me.
For other places where this is impacts the use of a site see:
http://www.laika.org/
http://placenamehere.com/pnh_vs_mouse2/
![]() |
||
Comment 1•23 years ago
|
||
Duplicate of "JS strict warnings execute onerror handlers..." (but see also bug
118464).
*** This bug has been marked as a duplicate of 63672 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•23 years ago
|
||
Reopening.
In neither of those bugs I see an explanation of why Mozilla is lumping warnings
and errors. They simply say they are. I don't believe that's an appropriate use
of onerror, and it is breaking pages. I saw those bugs when doing searches and
filed this one as an RFE to change the current behavior.
If someone wants to give me a compelling explaination as to why this shouldn't
be changed please do so and then mark this won't fix. Otherwise I think this
should be left open. But its not a dupe of bug 63672 and changing a pref file
string (as discussed in bug 118464), unless it (a) works and (b) is done by
default doesn't change this either.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
![]() |
||
Comment 3•23 years ago
|
||
Can you please clearly explain why this is not a dup of bug 63672? This bug is
about the fact that warnings trigger onerror. That is _exactly_ what bug 63672
is about.
If you feel that bug 63672 is resolved incorrectly, feel free to reopen it....
Reopening _this_ bug, which is assigned to the wrong person, is a little pointless.
Comment 4•22 years ago
|
||
Please reopen 63672 if you disagree with what it says, but this is an exact
duplicate of that bug.
*** This bug has been marked as a duplicate of 63672 ***
Status: REOPENED → RESOLVED
Closed: 23 years ago → 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•