Ticket #9627 (closed bug: wontfix)
Adding Object.toString causes $(handler) not to run handler
| Reported by: | samuel@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | support | Version: | 1.6.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Adding Object.toString causes $(handler) not to run handler
Commenting this out removes issue Object.prototype.toString = function() { };
Here's the jQuery Without this, ie5 throws exception Might be nice to do this on jQuery load failure? try { $() } catch(e) { $ = false } alert(true) not run if($) $(function() { alert(true) })
Change History
comment:2 follow-up: ↓ 3 Changed 2 years ago by rwaldron
- Priority changed from undecided to low
- Resolution set to wontfix
- Status changed from new to closed
- Component changed from unfiled to support
jQuery's current browser support is as follows:
- Chrome Current - 1
- Safari 3+
- Firefox 3.6.x, 4.0.x, 5.0.x
- IE 6,7,8,9
- Opera Current - 1
comment:3 in reply to: ↑ 2 Changed 2 years ago by samuel@…
Sorry, maybe I wasn't clear
Object.prototype.toString = function() { }
Causes complete failure of jQuery in Firefox 3.6.17. i.e. no jquery works.
The secondary, more minor issue, is that attempting to load jquery into ie5.5 throws an exception. I've got no problem with jquery not working here. It would just be nice not to get exceptions
comment:4 follow-up: ↓ 5 Changed 2 years ago by rwaldron
Writing to or configuring of Object.prototype is generally considered a bad practice and outside of jQuery's scope.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Above code didn't format well, let's try this:
Adding Object.toString causes $(handler) not to run handler //// Commenting this line out removes issue Object.prototype.toString = function() { }; //// Here's the jQuery // Without this line, ie5 throws exception // Might be nice to do this on jQuery load failure? try { $() } catch(e) { $ = false } // alert(true) not run -- due Object.prototype.toString if($) $(function() { alert(true) })