ie compatibility: hasOwnProperty is not a method on dom nodes.
This commit is contained in:
parent
3ba6c2dcc9
commit
3346f8874f
|
@ -544,8 +544,7 @@
|
||||||
|
|
||||||
|
|
||||||
var isDomNode = function(x) {
|
var isDomNode = function(x) {
|
||||||
return (x.hasOwnProperty('nodeType') &&
|
return (x.nodeType && x.nodeType === 1);
|
||||||
x.nodeType === 1);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -681,7 +680,7 @@
|
||||||
var key, val;
|
var key, val;
|
||||||
var result = makeList();
|
var result = makeList();
|
||||||
for (key in obj) {
|
for (key in obj) {
|
||||||
if (obj.hasOwnProperty(key)) {
|
if (obj.hasOwnProperty && obj.hasOwnProperty(key)) {
|
||||||
val = obj[key];
|
val = obj[key];
|
||||||
if (typeof(val) === 'number') {
|
if (typeof(val) === 'number') {
|
||||||
result = makePair(makeList(makeSymbol(key),
|
result = makePair(makeList(makeSymbol(key),
|
||||||
|
@ -822,7 +821,9 @@
|
||||||
LocationEventSource.prototype.onStart = function(fireEvent) {
|
LocationEventSource.prototype.onStart = function(fireEvent) {
|
||||||
if (this.id === undefined) {
|
if (this.id === undefined) {
|
||||||
var success = function(position) {
|
var success = function(position) {
|
||||||
if (position.hasOwnProperty('coords') &&
|
if (position.hasOwnProperty &&
|
||||||
|
position.hasOwnProperty('coords') &&
|
||||||
|
position.coords.hasOwnProperty &&
|
||||||
position.coords.hasOwnProperty('latitude') &&
|
position.coords.hasOwnProperty('latitude') &&
|
||||||
position.coords.hasOwnProperty('longitude')) {
|
position.coords.hasOwnProperty('longitude')) {
|
||||||
fireEvent(undefined,
|
fireEvent(undefined,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user