Skip to content

Commit

Permalink
Fix object flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts committed Aug 11, 2013
1 parent f8a3786 commit ed45939
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 58 deletions.
72 changes: 40 additions & 32 deletions lib/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,39 +74,47 @@
_flag: {
configurable: false,
enumerable: false,
value: Object.create(Object.prototype, {
canceled: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
dispatch: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
initialized: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
stopImmediatePropagation: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
stopPropagation: {
get: function getter() {
var flag = Object.create(Object.prototype, {
canceled: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
dispatch: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
initialized: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
stopImmediatePropagation: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
stopPropagation: {
configurable: false,
enumerable: true,
value: false,
writable: true
}
});
Object.defineProperty(this, '_flag', {
configurable: false,
enumerable: true,
value: false,
writable: true
}
}),
writable: false
enumerable: false,
value: flag,
writable: false
});
return flag;
}
},
bubbles: {
configurable: true,
Expand Down
60 changes: 34 additions & 26 deletions lib/xmlhttprequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,33 +99,41 @@
_flag: {
configurable: false,
enumerable: false,
value: Object.create(Object.prototype, {
anonymous: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
synchronous: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
uploadComplete: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
uploadEvents: {
get: function getter() {
var flag = Object.create(Object.prototype, {
anonymous: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
synchronous: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
uploadComplete: {
configurable: false,
enumerable: true,
value: false,
writable: true
},
uploadEvents: {
configurable: false,
enumerable: true,
value: false,
writable: true
}
});
Object.defineProperty(this, '_flag', {
configurable: false,
enumerable: true,
value: false,
writable: true
}
}),
writable: false
enumerable: false,
value: flag,
writable: false
});
return flag;
}
},
_properties: {
configurable: false,
Expand Down

0 comments on commit ed45939

Please sign in to comment.