-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgwdpage_min.js
4 lines (4 loc) · 1.76 KB
/
gwdpage_min.js
1
2
3
4
-function(){"use strict";var b=function(a){setTimeout(a,0)};var d=function(a,e){var c;c=document.createEvent("Event");c.initEvent(a,!0,!0);e.dispatchEvent(c)};document.register&&document.registerElement("gwd-page",{prototype:Object.create(HTMLDivElement.prototype,{createdCallback:{value:function(){this.d=this.handleReadyEvent_.bind(this);this.a=[];this.c=this.b=!1;var a=parseInt(this.getAttribute("data-gwd-width"),10)||this.clientWidth;this.e=(parseInt(this.getAttribute("data-gwd-height"),10)||this.clientHeight)>=a},enumerable:!0},attachedCallback:{value:function(){this.addEventListener("ready",this.d,!1);b(function(){this.a=Array.prototype.slice.call(this.querySelectorAll("*")).filter(function(a){return"function"!=
typeof a.gwdLoad||"function"!=typeof a.gwdIsLoaded||a.gwdIsLoaded()?!1:!0},this);this.c=!0;0<this.a.length?(this.style.visibility="hidden",this.b=!1):this.firePageReadyEvent_();d("attached",this)}.bind(this))},enumerable:!0},detachedCallback:{value:function(){this.removeEventListener("ready",this.d,!1);this.classList.remove("gwd-play-animation");d("detached",this)},enumerable:!0},gwdIsLoaded:{value:function(){return this.c&&0==this.a.length},enumerable:!0},gwdLoad:{value:function(){if(this.gwdIsLoaded())this.firePageReadyEvent_();
else for(var a=this.a.length-1;0<=a;a--)this.a[a].gwdLoad()},enumerable:!0},handleReadyEvent_:{value:function(a){a=this.a.indexOf(a.target);0<=a&&(this.a.splice(a,1),0==this.a.length&&this.firePageReadyEvent_())},enumerable:!1},firePageReadyEvent_:{value:function(){this.style.visibility="";this.b||(d("ready",this),d("pageload",this));this.b=!0},enumerable:!1},gwdPresent:{value:function(){d("pagepresenting",this);this.classList.add("gwd-play-animation")},enumerable:!0},isPortrait:{value:function(){return this.e}}}),
"extends":"div"});}()