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

Commit fb5e644

Browse files
committed
fix(patchViaPropertyDescriptor): disable if properties are not configurable
closes #42
1 parent 11c025b commit fb5e644

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: zone.js

+8
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,14 @@ Zone.patch = function patch () {
375375

376376
//
377377
Zone.canPatchViaPropertyDescriptor = function () {
378+
if (!Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'onclick') &&
379+
typeof Element !== 'undefined') {
380+
// WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
381+
// IDL interface attributes are not configurable
382+
var desc = Object.getOwnPropertyDescriptor(Element.prototype, 'onclick');
383+
if (desc && !desc.configurable) return false;
384+
}
385+
378386
Object.defineProperty(HTMLElement.prototype, 'onclick', {
379387
get: function () {
380388
return true;

0 commit comments

Comments
 (0)