Skip to content

Commit

Permalink
[wrap] Fix doc comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Dec 20, 2018
1 parent d8aac3b commit 8e50602
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/utils/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

// Node wrapper to ensure ShadowDOM safe operation regardless of polyfill
// presence or mode. Note that with the introduction of `ShadyDOM.noPatch`,
// a node wrapper must be used to access ShadowDOM API.
// This is similar to using `Polymer.dom` but relies exclusively
// on the presence of the ShadyDOM polyfill rather than requiring the loading
// of legacy (Polymer.dom) API.
/* eslint-disable valid-jsdoc */
/**
* Node wrapper to ensure ShadowDOM safe operation regardless of polyfill
* presence or mode. Note that with the introduction of `ShadyDOM.noPatch`,
* a node wrapper must be used to access ShadowDOM API.
* This is similar to using `Polymer.dom` but relies exclusively
* on the presence of the ShadyDOM polyfill rather than requiring the loading
* of legacy (Polymer.dom) API.
* @type {function(Node):Node}
*/
export const wrap = (window['ShadyDOM'] && window['ShadyDOM']['noPatch'] && window['ShadyDOM']['wrap']) ?
window['ShadyDOM']['wrap'] : (n) => n;

0 comments on commit 8e50602

Please sign in to comment.