From fb5e64413654e2e99eb8a65632b6b8193ab846c2 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Thu, 19 Feb 2015 17:54:15 -0500 Subject: [PATCH] fix(patchViaPropertyDescriptor): disable if properties are not configurable closes #42 --- zone.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zone.js b/zone.js index deb5f3312..a2c327401 100644 --- a/zone.js +++ b/zone.js @@ -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;