diff options
author | James Lal <james@lightsofapollo.com> | 2012-08-08 00:02:25 -0700 |
---|---|---|
committer | James Lal <james@lightsofapollo.com> | 2012-08-08 00:02:25 -0700 |
commit | 6857f7674d3937ae0d9d9749e8a2296f5f2b7c30 (patch) | |
tree | 3f4f51c7caa12f2f02cdc94d7e80260fc64385e8 | |
parent | 7a43bc130ad3eb7beb0dc20a495ca178268a2667 (diff) | |
download | jsCalDAV-6857f7674d3937ae0d9d9749e8a2296f5f2b7c30.tar.gz |
replace hasOwnProperty with Object.hasOwnProperty calls
-rw-r--r-- | caldav.js | 21 | ||||
-rw-r--r-- | lib/caldav/connection.js | 2 | ||||
-rw-r--r-- | lib/caldav/request/abstract.js | 2 | ||||
-rw-r--r-- | lib/caldav/request/calendar_home.js | 4 | ||||
-rw-r--r-- | lib/caldav/resources/calendar.js | 3 | ||||
-rw-r--r-- | lib/caldav/responder.js | 2 | ||||
-rw-r--r-- | lib/caldav/sax/base.js | 2 | ||||
-rw-r--r-- | lib/caldav/sax/dav_response.js | 2 | ||||
-rw-r--r-- | lib/caldav/xhr.js | 4 |
9 files changed, 22 insertions, 20 deletions
@@ -5911,7 +5911,7 @@ function write (chunk) { if (typeof(callback) === 'undefined' && typeof(type) === 'object') { for (event in type) { - if (type.hasOwnProperty(event)) { + if (Object.hasOwnProperty.call(type, event)) { this.addEventListener(event, type[event]); } } @@ -6403,7 +6403,7 @@ function write (chunk) { } for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } @@ -6482,7 +6482,7 @@ function write (chunk) { } for (header in this.headers) { - if (this.headers.hasOwnProperty(header)) { + if (Object.hasOwnProperty.call(this.headers, header)) { xhr.setRequestHeader(header, this.headers[header]); } } @@ -6528,7 +6528,7 @@ function write (chunk) { var key; for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } @@ -6777,7 +6777,7 @@ function write (chunk) { child._super = this; for (key in obj) { - if (obj.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(obj, key)) { child[key] = obj[key]; } } @@ -7021,7 +7021,7 @@ function write (chunk) { delete this.current.prop; for (key in props) { - if (props.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(props, key)) { propstat[key] = { status: status, value: props[key] @@ -7095,7 +7095,7 @@ function write (chunk) { this.sax = new SAX(); for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } @@ -7305,7 +7305,7 @@ function write (chunk) { } for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } @@ -7317,7 +7317,7 @@ function write (chunk) { var url, results = [], prop; for (url in data) { - if (data.hasOwnProperty(url)) { + if (Object.hasOwnProperty.call(data, url)) { if (name in data[url]) { prop = data[url][name]; if (prop.status === '200') { @@ -7574,6 +7574,7 @@ function write (chunk) { 'calendar-description': 'description', 'getctag': 'ctag', + 'getetag': 'etag', 'getlastmodified': 'lastmodified', 'resourcetype': { @@ -7652,7 +7653,7 @@ function write (chunk) { } for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { if (key in this._map) { descriptor = this._map[key]; value = options[key]; diff --git a/lib/caldav/connection.js b/lib/caldav/connection.js index dae38d7..6884217 100644 --- a/lib/caldav/connection.js +++ b/lib/caldav/connection.js @@ -17,7 +17,7 @@ var key; for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } diff --git a/lib/caldav/request/abstract.js b/lib/caldav/request/abstract.js index cc60391..04101b5 100644 --- a/lib/caldav/request/abstract.js +++ b/lib/caldav/request/abstract.js @@ -21,7 +21,7 @@ this.sax = new SAX(); for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } diff --git a/lib/caldav/request/calendar_home.js b/lib/caldav/request/calendar_home.js index 7d4c744..5ededb5 100644 --- a/lib/caldav/request/calendar_home.js +++ b/lib/caldav/request/calendar_home.js @@ -14,7 +14,7 @@ } for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } @@ -26,7 +26,7 @@ var url, results = [], prop; for (url in data) { - if (data.hasOwnProperty(url)) { + if (Object.hasOwnProperty.call(data, url)) { if (name in data[url]) { prop = data[url][name]; if (prop.status === '200') { diff --git a/lib/caldav/resources/calendar.js b/lib/caldav/resources/calendar.js index 9bff517..2adf614 100644 --- a/lib/caldav/resources/calendar.js +++ b/lib/caldav/resources/calendar.js @@ -34,6 +34,7 @@ 'calendar-description': 'description', 'getctag': 'ctag', + 'getetag': 'etag', 'getlastmodified': 'lastmodified', 'resourcetype': { @@ -112,7 +113,7 @@ } for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { if (key in this._map) { descriptor = this._map[key]; value = options[key]; diff --git a/lib/caldav/responder.js b/lib/caldav/responder.js index 6ba41c4..ae1cf16 100644 --- a/lib/caldav/responder.js +++ b/lib/caldav/responder.js @@ -90,7 +90,7 @@ if (typeof(callback) === 'undefined' && typeof(type) === 'object') { for (event in type) { - if (type.hasOwnProperty(event)) { + if (Object.hasOwnProperty.call(type, event)) { this.addEventListener(event, type[event]); } } diff --git a/lib/caldav/sax/base.js b/lib/caldav/sax/base.js index a823aad..3672af3 100644 --- a/lib/caldav/sax/base.js +++ b/lib/caldav/sax/base.js @@ -21,7 +21,7 @@ child._super = this; for (key in obj) { - if (obj.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(obj, key)) { child[key] = obj[key]; } } diff --git a/lib/caldav/sax/dav_response.js b/lib/caldav/sax/dav_response.js index 64bf2dd..7256ce6 100644 --- a/lib/caldav/sax/dav_response.js +++ b/lib/caldav/sax/dav_response.js @@ -192,7 +192,7 @@ delete this.current.prop; for (key in props) { - if (props.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(props, key)) { propstat[key] = { status: status, value: props[key] diff --git a/lib/caldav/xhr.js b/lib/caldav/xhr.js index ff4bdd3..4ed7ec6 100644 --- a/lib/caldav/xhr.js +++ b/lib/caldav/xhr.js @@ -34,7 +34,7 @@ } for (key in options) { - if (options.hasOwnProperty(key)) { + if (Object.hasOwnProperty.call(options, key)) { this[key] = options[key]; } } @@ -113,7 +113,7 @@ } for (header in this.headers) { - if (this.headers.hasOwnProperty(header)) { + if (Object.hasOwnProperty.call(this.headers, header)) { xhr.setRequestHeader(header, this.headers[header]); } } |