Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
fix(patchViaPropertyDescriptor): disable if properties are not config…
Browse files Browse the repository at this point in the history
…urable

closes #42
  • Loading branch information
caitp committed Feb 19, 2015
1 parent 11c025b commit fb5e644
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,14 @@ Zone.patch = function patch () {

//
Zone.canPatchViaPropertyDescriptor = function () {
if (!Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
typeof Element !== 'undefined') {
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
// IDL interface attributes are not configurable
var desc = Object.getOwnPropertyDescriptor(Element.prototype, 'onclick');
if (desc && !desc.configurable) return false;
}

Object.defineProperty(HTMLElement.prototype, 'onclick', {
get: function () {
return true;
Expand Down

0 comments on commit fb5e644

Please sign in to comment.