[OpenLayers-Trac] [OpenLayers] #1565: add cross-browser XMLHttpRequest and convenience methods

OpenLayers trac at openlayers.org
Tue Jun 3 13:57:19 EDT 2008


#1565: add cross-browser XMLHttpRequest and convenience methods
----------------------+-----------------------------------------------------
  Reporter:  tschaub  |       Owner:             
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.7 Release
 Component:  Ajax     |     Version:  2.6        
Resolution:           |    Keywords:             
     State:  Review   |  
----------------------+-----------------------------------------------------
Comment (by tschaub):

 Replying to [comment:2 elemoine]:
 > I'm in favor for this going into trunk at some point.
 >
 > Have no time to do a full review right now but here are preliminary
 questions:
 >
 > Preliminary question: is the goal to have
 OpenLayers.Request.XMLHttpRequest just wrap the
 http://code.google.com/p/xmlhttprequest/ code and not modify that code?
 (so that we can just copy&paste upstream code should that upstream code
 change)

 Yeah, I'd like to change as little of the XMLHttpRequest code as possible.
 Right now, it's just the "export" line that I've modified (to get
 XMLHttpRequest in the OpenLayers.Request namespace).

 I would have grabbed the latest version, but I was left with a bit of
 license confusion.  The main page
 (http://code.google.com/p/xmlhttprequest/) links to LGPL, but the source
 in the zip archive says "You should have received a copy of the GNU
 General Public License
  along with this program" (and the archive doesn't contain the GPL or LGPL
 license detail).

 So, since the old version was Apache 2.0 license, I left that as it was.

 In general, I think it makes sense to take advantage of small, single-
 purpose, well written libraries.  I'd rather have us responsible for
 tracking upgrades to this one small script - instead of trying to merge
 changes from a larger frameworky thing.

 >
 > OpenLayers/Request/XMLHttpRequest.js re-defines
 window.Function.prototype.apply to deal with IE 5.0 not having
 window.Function.prototype.apply. Do we want this kind of redefinition in
 OL?
 >

 My vote is that this is an acceptable thing to allow in OL.  If we get to
 3.0 and ditch the old prototype extensions, this would leave us with one
 extension to native prototypes - and most importantly, it is a standard
 ECMA method and it is only added where it doesn't already exist.  That I
 can swallow.

 Extending prototypes with names that sound good to one author is one
 thing.  Extending ECMA standard names to browsers that don't support them
 is another.

 > Thank you Tim.

 Thanks for taking a look at it.  I'll report on IE tests sometime soon.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1565#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list