Skip to main content

Bug Tracker

Side navigation

#96 closed feature (wontfix)

Opened July 26, 2006 04:32AM UTC

Closed September 17, 2006 10:15AM UTC

Last modified June 19, 2007 03:49PM UTC

Create IE 5.0 Support Plugin

Reported by: john Owned by:
Priority: major Milestone: 1.0
Component: core Version: 1.0
Keywords: Cc:
Blocked by: Blocking:
Description

There needs to be a plugin that can be used to support IE 5.0

Attachments (0)
Change History (3)

Changed July 26, 2006 07:14PM UTC by alistair.pot comment:1

Here's what I use - it works for me, but I certainly don't use the full set of jquery methods. However, I think it covers most of the gaps.



/*
* Array Functionality
* script: array.js
* for: browsers not implementing the full array functionality of ECMA262-3
* by: liorean
* thanks to: beetle
*/

if(typeof Array.prototype.copy == 'undefined')Array.prototype.copy = function(a) {
   var i = 0, b = [];
   for(i; i < this.length; i++)b[i] = (typeof this[i].copy != 'undefined') ? this[i].copy() : this[i];
   return b}
;

if(typeof Array.prototype.concat == 'undefined')Array.prototype.concat = function(a) {
   var i = 0, b = this.copy();
   for(i; i < a.length; i++)b[b.length] = a[i];
   return b}
;

if(typeof Array.prototype.pop == 'undefined')Array.prototype.pop = function() {
   var b = this[this.length - 1];
   this.length--;
   return b}
;

if(typeof Array.prototype.push == 'undefined')Array.prototype.push = function() {
   var i = 0, b = this.length, a = arguments;
   for(i; i < a.length; i++)this[b + i] = a[i];
   return this.length}
;

if(typeof Array.prototype.shift == 'undefined')Array.prototype.shift = function() {
   var i = 0, b = this[0];
   for(i; i < this.length - 1; i++)this[i] = this[i + 1];
   this.length--;
   return b}
;

if(typeof Array.prototype.slice == 'undefined')Array.prototype.slice = function(a, c) {
   var i = 0, b, d = [];
   if(!c)c = this.length;
   if(c < 0)c = this.length + c;
   if(a < 0)a = this.length - a;
   if(c < a) {
      b = a;
      a = c;
      c = b}
   for(i; i < c - a; i++)d[i] = this[a + i];
   return d}
;

if(typeof Array.prototype.splice == 'undefined')Array.prototype.splice = function(a, c) {
   var i = 0, e = arguments, d = this.copy(), f = a;
   if(!c)c = this.length - a;
   for(i; i < e.length - 2; i++)this[a + i] = e[i + 2];
   for(a; a < this.length - c; a++)this[a + e.length - 2] = d[a - c];
   this.length -= c - e.length + 2;
   return d.slice(f, f + c)}
;

if(typeof Array.prototype.unshift == 'undefined')Array.prototype.unshift = function(a) {
   var b;
   this.reverse();
   b = this.push(a);
   this.reverse();
   return b}
;

if (typeof Function.apply != 'function') {
   Function.prototype.apply = function(o, a) {
      o.____apply = this;
      switch(((typeof a == 'object') && (a.length)) || 0) {
         case 0 : o.____apply();
         break;
         case 1 : o.____apply(a[0]);
         break;
         case 2 : o.____apply(a[0], a[1]);
         break;
         default : o.____apply(a[0], a[1], a[2]);
         break;
         }
      }
   ;
   }



Your mileage, as they say, may vary...

Changed August 17, 2006 07:14PM UTC by chx comment:2

I doubt this is major. IE 5.0 was released seven years ago or some such. It's market share is next to nothing now.

Changed September 17, 2006 10:15AM UTC by joern comment:3

resolution: → wontfix
status: newclosed

There were several attempts to this, which ended with this message by Alistair Potts:

"OK, I've done some more work on this and it's a hopeless task. While you

can rewrite the pseudo-apply function to work, IE5.0 can't seem to work

out the length of the jquery object correctly.

But even if you get that working, IE5.0 doesn't support rudimentary

RegExp, e.g. "?=w".

It's time to give up. It's beyond a plugin to fix. John, if you read

this, don't waste your time with an IE5.0 plugin, there is more

important stuff to address!"