From 3ee4eb96b2f437d6a947549865123b29c216e54d Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Wed, 31 Oct 2018 14:51:28 -0700 Subject: [PATCH] Fix another unsafe property assignment in Polymer. In polymer.dom.js, we stick __domApi on nodes, but we don't prevent that property from being renamed when compiled. It seems that the renamed property can sometimes collide in a bad way with some other unsafe property we stick on nodes in the polyfill (not sure which yet). --- lib/legacy/polymer.dom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/legacy/polymer.dom.js b/lib/legacy/polymer.dom.js index 392e910d36..11f4bb7472 100644 --- a/lib/legacy/polymer.dom.js +++ b/lib/legacy/polymer.dom.js @@ -401,14 +401,14 @@ forwardProperties(DomApi.prototype, [ */ export const dom = function(obj) { obj = obj || document; - if (!obj.__domApi) { + if (!obj['__domApi']) { let helper; if (obj instanceof Event) { helper = new EventApi(obj); } else { helper = new DomApi(obj); } - obj.__domApi = helper; + obj['__domApi'] = helper; } - return obj.__domApi; + return obj['__domApi']; };