as universally approved on discussions on dev list, replace new Object() with {}. all tests pass ff & ie6
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3814 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/**
|
||||
* Namespace: Util
|
||||
*/
|
||||
OpenLayers.Util = new Object();
|
||||
OpenLayers.Util = {};
|
||||
|
||||
/**
|
||||
* Function: getElement
|
||||
@@ -459,7 +459,7 @@ OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL,
|
||||
* {Object} A new Object with all the same keys but uppercased
|
||||
*/
|
||||
OpenLayers.Util.upperCaseObject = function (object) {
|
||||
var uObject = new Object();
|
||||
var uObject = {};
|
||||
for (var key in object) {
|
||||
uObject[key.toUpperCase()] = object[key];
|
||||
}
|
||||
@@ -767,7 +767,7 @@ OpenLayers.Util.getArgs = function(url) {
|
||||
return {};
|
||||
}
|
||||
|
||||
var args = new Object();
|
||||
var args = {};
|
||||
pairs = query.split(/[&;]/);
|
||||
for(var i = 0; i < pairs.length; ++i) {
|
||||
keyValue = pairs[i].split('=');
|
||||
@@ -971,7 +971,7 @@ OpenLayers.Util.pagePosition = function(forElement) {
|
||||
* {Boolean} Whether or not the two URLs are equivalent
|
||||
*/
|
||||
OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {
|
||||
options = options || new Object();
|
||||
options = options || {};
|
||||
|
||||
OpenLayers.Util.applyDefaults(options, {
|
||||
ignoreCase: true,
|
||||
@@ -1041,9 +1041,9 @@ OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) {
|
||||
* and ready for comparison
|
||||
*/
|
||||
OpenLayers.Util.createUrlObject = function(url, options) {
|
||||
options = options || new Object();
|
||||
options = options || {};
|
||||
|
||||
var urlObject = new Object();
|
||||
var urlObject = {};
|
||||
|
||||
if (options.ignoreCase) {
|
||||
url = url.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user