@webcomponents/shadycss
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -10,3 +10,3 @@ (function(){/* | ||
*/ | ||
'use strict';var c=!(window.ShadyDOM&&window.ShadyDOM.inUse),f;function g(a){f=a&&a.shimcssproperties?!1:c||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?f=window.ShadyCSS.nativeCss:window.ShadyCSS?(g(window.ShadyCSS),window.ShadyCSS=void 0):g(window.WebComponents&&window.WebComponents.flags);var h=f;function k(a,b){for(var d in b)null===d?a.style.removeProperty(d):a.style.setProperty(d,b[d])};var l=null,m=window.HTMLImports&&window.HTMLImports.whenReady||null,n;function p(a){requestAnimationFrame(function(){m?m(a):(l||(l=new Promise(function(a){n=a}),"complete"===document.readyState?n():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&n()})),l.then(function(){a&&a()}))})};var q=null,r=null;function t(){this.customStyles=[];this.enqueued=!1;p(function(){window.ShadyCSS.flushCustomStyles()})}function u(a){!a.enqueued&&r&&(a.enqueued=!0,p(r))}t.prototype.c=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),u(this))};t.prototype.b=function(a){if(a.__shadyCSSCachedStyle)return a.__shadyCSSCachedStyle;var b;a.getStyle?b=a.getStyle():b=a;return b}; | ||
'use strict';var c=!(window.ShadyDOM&&window.ShadyDOM.inUse),f;function g(a){f=a&&a.shimcssproperties?!1:c||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?f=window.ShadyCSS.nativeCss:window.ShadyCSS?(g(window.ShadyCSS),window.ShadyCSS=void 0):g(window.WebComponents&&window.WebComponents.flags);var h=f;function k(a,b){for(var d in b)null===d?a.style.removeProperty(d):a.style.setProperty(d,b[d])};var l=null,m=window.HTMLImports&&window.HTMLImports.whenReady||null,n;function p(a){requestAnimationFrame(function(){m?m(a):(l||(l=new Promise(function(a){n=a}),"complete"===document.readyState?n():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&n()})),l.then(function(){a&&a()}))})};var q=null,r=null;function t(){this.customStyles=[];this.enqueued=!1;p(function(){window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}function u(a){!a.enqueued&&r&&(a.enqueued=!0,p(r))}t.prototype.c=function(a){a.__seenByShadyCSS||(a.__seenByShadyCSS=!0,this.customStyles.push(a),u(this))};t.prototype.b=function(a){if(a.__shadyCSSCachedStyle)return a.__shadyCSSCachedStyle;var b;a.getStyle?b=a.getStyle():b=a;return b}; | ||
t.prototype.a=function(){for(var a=this.customStyles,b=0;b<a.length;b++){var d=a[b];if(!d.__shadyCSSCachedStyle){var e=this.b(d);e&&(e=e.__appliedElement||e,q&&q(e),d.__shadyCSSCachedStyle=e)}}return a};t.prototype.addCustomStyle=t.prototype.c;t.prototype.getStyleForCustomStyle=t.prototype.b;t.prototype.processStyles=t.prototype.a; | ||
@@ -13,0 +13,0 @@ Object.defineProperties(t.prototype,{transformCallback:{get:function(){return q},set:function(a){q=a}},validateCallback:{get:function(){return r},set:function(a){var b=!1;r||(b=!0);r=a;b&&u(this)}}});var v=new t;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},styleSubtree:function(a,b){v.a();k(a,b)},styleElement:function(){v.a()},styleDocument:function(a){v.a();k(document.body,a)},getComputedStyleValue:function(a,b){return(a=window.getComputedStyle(a).getPropertyValue(b))?a.trim():""},flushCustomStyles:function(){},nativeCss:h,nativeShadow:c});window.ShadyCSS.CustomStyleInterface=v;}).call(this); |
{ | ||
"name": "@webcomponents/shadycss", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Styling helpers for ShadyDOM", | ||
@@ -5,0 +5,0 @@ "main": "shadycss.min.js", |
@@ -49,3 +49,7 @@ /** | ||
// NOTE(dfreedm): use quotes here to prevent closure inlining to `function(){}`; | ||
documentWait(() => {window['ShadyCSS']['flushCustomStyles']()}) | ||
documentWait(() => { | ||
if (window['ShadyCSS']['flushCustomStyles']) { | ||
window['ShadyCSS']['flushCustomStyles'](); | ||
} | ||
}) | ||
} | ||
@@ -52,0 +56,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
545714
87
4111