fontfaceobserver
Advanced tools
Comparing version 1.4.15 to 1.4.16
@@ -1,4 +0,5 @@ | ||
(function(){'use strict';function f(a){function b(){document.body?a():setTimeout(b,0)}b()};function h(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.g=document.createElement("span");this.f=-1;this.b.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;";this.c.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;"; | ||
this.g.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;";this.h.style.cssText="display:inline-block;width:200%;height:200%;";this.b.appendChild(this.h);this.c.appendChild(this.g);this.a.appendChild(this.b);this.a.appendChild(this.c)}function p(a,b,c){a.a.style.cssText="min-width:20px;min-height:20px;display:inline-block;position:absolute;width:auto;margin:0;padding:0;top:-999px;left:-999px;white-space:nowrap;font-size:100px;font-family:"+b+";"+c} | ||
function u(a){var b=a.a.offsetWidth,c=b+100;a.g.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.f!==b?(a.f=b,!0):!1}function v(a,b){a.b.addEventListener("scroll",function(){u(a)&&null!==a.a.parentNode&&b(a.f)},!1);a.c.addEventListener("scroll",function(){u(a)&&null!==a.a.parentNode&&b(a.f)},!1);u(a)};var A=[];function B(a){A.push(a);1===A.length&&C()}function D(){for(;A.length;)A[0](),A.shift()}if(window.MutationObserver){var E=document.createElement("div");(new MutationObserver(D)).observe(E,{attributes:!0});var C=function(){E.setAttribute("x",0)}}else C=function(){setTimeout(D)};function F(a){this.a=G;this.b=void 0;this.c=[];var b=this;try{a(function(a){b.resolve(a)},function(a){b.reject(a)})}catch(c){b.reject(c)}}var G=2;function H(a){return new F(function(b,c){c(a)})}function I(a){return new F(function(b){b(a)})} | ||
(function(){'use strict';function f(a){function b(){document.body?a():setTimeout(b,0)}b()};function h(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.g=document.createElement("span");this.f=-1;this.b.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;"; | ||
this.g.style.cssText="display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;";this.b.appendChild(this.h);this.c.appendChild(this.g);this.a.appendChild(this.b);this.a.appendChild(this.c)} | ||
function p(a,b,c){a.a.style.cssText="min-width:20px;min-height:20px;display:inline-block;position:absolute;width:auto;margin:0;padding:0;top:-999px;left:-999px;white-space:nowrap;font-size:100px;font-family:"+b+";"+c}function u(a){var b=a.a.offsetWidth,c=b+100;a.g.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.f!==b?(a.f=b,!0):!1} | ||
function v(a,b){a.b.addEventListener("scroll",function(){u(a)&&null!==a.a.parentNode&&b(a.f)},!1);a.c.addEventListener("scroll",function(){u(a)&&null!==a.a.parentNode&&b(a.f)},!1);u(a)};var A=[];function B(a){A.push(a);1===A.length&&C()}function D(){for(;A.length;)A[0](),A.shift()}if(window.MutationObserver){var E=document.createElement("div");(new MutationObserver(D)).observe(E,{attributes:!0});var C=function(){E.setAttribute("x",0)}}else C=function(){setTimeout(D)};function F(a){this.a=G;this.b=void 0;this.c=[];var b=this;try{a(function(a){b.resolve(a)},function(a){b.reject(a)})}catch(c){b.reject(c)}}var G=2;function H(a){return new F(function(b,c){c(a)})}function I(a){return new F(function(b){b(a)})} | ||
F.prototype.resolve=function(a){var b=this;if(b.a===G){if(a===b)throw new TypeError("Promise settled with itself.");var c=!1;try{var e=a&&a.then;if(null!==a&&"object"===typeof a&&"function"===typeof e){e.call(a,function(a){c||b.resolve(a);c=!0},function(a){c||b.reject(a);c=!0});return}}catch(d){c||b.reject(d);return}b.a=0;b.b=a;J(b)}};F.prototype.reject=function(a){if(this.a===G){if(a===this)throw new TypeError("Promise settled with itself.");this.a=1;this.b=a;J(this)}}; | ||
@@ -5,0 +6,0 @@ function J(a){B(function(){if(a.a!==G)for(;a.c.length;){var b=a.c.shift(),c=b[0],e=b[1],d=b[2],b=b[3];try{0===a.a?"function"===typeof c?d(c.call(void 0,a.b)):d(a.b):1===a.a&&("function"===typeof e?d(e.call(void 0,a.b)):b(a.b))}catch(g){b(g)}}})}F.prototype.f=function(a){return this.then(void 0,a)};F.prototype.then=function(a,b){var c=this;return new F(function(e,d){c.c.push([a,b,e,d]);J(c)})}; |
{ | ||
"name": "fontfaceobserver", | ||
"version": "1.4.15", | ||
"version": "1.4.16", | ||
"description": "Detect if web fonts are available", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -15,3 +15,3 @@ goog.provide('fontface.Ruler'); | ||
'width:100%;' + | ||
'overflow:scroll;'; | ||
'overflow:scroll;font-size:16px;'; | ||
@@ -33,3 +33,3 @@ this.element = dom.createElement('div'); | ||
dom.style(this.expandableInner, style); | ||
dom.style(this.collapsibleInner, 'display:inline-block;width:200%;height:200%;'); | ||
dom.style(this.collapsibleInner, 'display:inline-block;width:200%;height:200%;font-size:16px;'); | ||
@@ -36,0 +36,0 @@ dom.append(this.collapsible, this.collapsibleInner); |
957513
3516