Skip to content

Commit

Permalink
Add shareBuiltCSSWithAdoptedStyleSheets global setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bicknellr committed Apr 3, 2020
1 parent 20b207e commit 2fc9062
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion lib/utils/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,22 @@ export let legacyNoObservedAttributes =
*/
export const setLegacyNoObservedAttributes = function(noObservedAttributes) {
legacyNoObservedAttributes = noObservedAttributes;
};
};

/**
* Setting to enable use of `adoptedStyleSheets` for sharing style sheets
* between component instances' shadow roots, if the app uses built Shady CSS
* styles.
*/
export let shareBuiltCSSWithAdoptedStyleSheets =
window.Polymer && window.Polymer.shareBuiltCSSWithAdoptedStyleSheets || false;

/**
* Sets `shareBuiltCSSWithAdoptedStyleSheets` globally.
*
* @param {boolean} newValue enable or disable `shareBuiltCSSWithAdoptedStyleSheets`
* @return {void}
*/
export const setShareBuiltCSSWithAdoptedStyleSheets = function(value) {
shareBuiltCSSWithAdoptedStyleSheets = value;
};

0 comments on commit 2fc9062

Please sign in to comment.