fix the sd-ce entrypoint for WCR

This commit is contained in:
Daniel Freedman
2017-04-07 10:44:58 -07:00
parent 7b13afd170
commit 3aa2c32254
4 changed files with 26 additions and 8 deletions

6
.gitattributes vendored
View File

@@ -1,3 +1,3 @@
webcomponents*.js binary
webcomponents*.js.map binary
webcomponents-loader.js -binary
/webcomponents*.js binary
/webcomponents*.js.map binary
/webcomponents-loader.js -binary

View File

@@ -18,6 +18,24 @@ import '../bower_components/shadydom/src/shadydom.js'
import '../bower_components/custom-elements/src/custom-elements.js'
import '../bower_components/shadycss/entrypoints/scoping-shim.js'
requestAnimationFrame(() => {
window.dispatchEvent(new CustomEvent('WebComponentsReady'));
});
// NOTE: this is a load-bearing IIFE for Closure
(function() {
let document = window.document;
function fire() {
requestAnimationFrame(() => {
window.document.dispatchEvent(new CustomEvent('WebComponentsReady', { bubbles: true }));
})
}
function wait() {
fire();
document.removeEventListener('readystatechange', wait);
}
if (document.readyState !== 'loading') {
fire();
} else {
document.addEventListener('readystatechange', wait);
}
})();

View File

@@ -141,7 +141,7 @@ c&&this.Ea(c)}};k.prototype.I=function(a){for(var b=0;b<a.length;b++){var c=this
c.trim():""};k.prototype.Ia=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d)for(var d=d.split(/\s/),e=0;e<d.length;e++)if(d[e]===r.a){c=d[e+1];break}}c&&b.push(r.a,c);v||(c=t.get(a))&&c.C&&b.push(J.g,c.C);ia(a,b.join(" "))};k.prototype.Ga=function(a){return t.get(a)};k.prototype.flush=k.prototype.H;k.prototype.prepareTemplate=k.prototype.prepareTemplate;k.prototype.styleElement=k.prototype.styleElement;k.prototype.styleDocument=
k.prototype.styleDocument;k.prototype.styleSubtree=k.prototype.styleSubtree;k.prototype.getComputedStyleValue=k.prototype.getComputedStyleValue;k.prototype.setElementClass=k.prototype.Ia;k.prototype._styleInfoForNode=k.prototype.Ga;k.prototype.transformCustomStyleForDocument=k.prototype.B;k.prototype.getStyleAst=k.prototype.Ha;k.prototype.styleAstToString=k.prototype.Ja;k.prototype.flushCustomStyles=k.prototype.f;Object.defineProperties(k.prototype,{nativeShadow:{get:function(){return u}},nativeCss:{get:function(){return v}}});
var G=new k,cb,db;window.ShadyCSS&&(cb=window.ShadyCSS.ApplyShim,db=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:G,prepareTemplate:function(a,b,c){G.f();G.prepareTemplate(a,b,c)},styleSubtree:function(a,b){G.f();G.styleSubtree(a,b)},styleElement:function(a){G.f();G.styleElement(a)},styleDocument:function(a){G.f();G.styleDocument(a)},getComputedStyleValue:function(a,b){return G.getComputedStyleValue(a,b)},nativeCss:v,nativeShadow:u};cb&&(window.ShadyCSS.ApplyShim=cb);db&&(window.ShadyCSS.CustomStyleInterface=
db);requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent("WebComponentsReady"))})})();
db);(function(){function a(){requestAnimationFrame(function(){window.document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}function b(){a();c.removeEventListener("readystatechange",b)}var c=window.document;"loading"!==c.readyState?a():c.addEventListener("readystatechange",b)})()})();
}).call(self)
//# sourceMappingURL=webcomponents-sd-ce.js.map

File diff suppressed because one or more lines are too long