Modify ↓
#13049 closed enhancement (fixed)
IE 8 doesn't support Array.prototype.forEach
Reported by: | Peter Suter | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | WikiAutoCompletePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
From comment:3:ticket:13012:
I'm using this plugin with the following patch on my production environments.
IE 8 doesn't support
Array.prototype.forEach
, which is used by jquery.textcomplete.js. In my production environments, javascript errors are captured and reported usingwindows.onerror
. The patch would prevent noisy errors aboutforEach
.
wikiautocomplete/htdocs/js/wikiautocomplete.js
diff --git a/wikiautocomplete/htdocs/js/wikiautocomplete.js b/wikiautocomplete/htdocs/ index ea6c607..4c966c1 100644
a b 1 1 jQuery(document).ready(function($) { 2 if (Array.prototype.forEach === undefined) 3 return; 4 2 5 var cache = {}; 3 6 4 7 function escape_newvalue(value) {
Attachments (0)
Note: See
TracTickets for help on using
tickets.
The proposed patch is fine with me. Feel free to commit.