Skip to content

Commit

Permalink
[ci skip] Add/fix comments per review.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Sep 23, 2019
1 parent 7fa7897 commit cbc722b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/mixins/property-effects.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ function dispatchNotifyEvent(inst, eventName, value, path) {
if (path) {
detail.path = path;
}
// As a performance optimization, we could elide the wrap here since notifying
// events are non-bubbling and shouldn't need retargeting. However, a very
// small number of internal tests failed in obscure ways, which may indicate
// user code relied on timing differences resulting from ShadyDOM flushing
// as a result of the wrapped `dispatchEvent`.
wrap(/** @type {!HTMLElement} */(inst)).dispatchEvent(new CustomEvent(eventName, { detail }));
}

Expand Down
3 changes: 2 additions & 1 deletion lib/utils/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ export let suppressTemplateNotifications =
window.Polymer && window.Polymer.suppressTemplateNotifications || false;

/**
* Sets `fastDomIf` globally, to put `dom-if` in a performance-optimized mode.
* Sets `suppressTemplateNotifications` globally, to disable `dom-change` and
* `rendered-item-count` events from `dom-if` and `dom-repeat`.
*
* @param {boolean} suppress enable or disable `suppressTemplateNotifications`
* @return {void}
Expand Down

0 comments on commit cbc722b

Please sign in to comment.