@glitchr/transparent 1.0.80 → 1.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/js/transparent.js +13 -5
package/package.json
CHANGED
package/src/js/transparent.js
CHANGED
|
@@ -1486,11 +1486,19 @@ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addE
|
|
|
1486
1486
|
(function() {
|
|
1487
1487
|
function doCallback() {
|
|
1488
1488
|
_tx("doCallback FIRES → callback() (which starts fadeOut)");
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1489
|
+
// requestAnimationFrame here guarantees the browser has had one
|
|
1490
|
+
// full frame to apply the new page's stylesheets and re-layout
|
|
1491
|
+
// before fadeOut starts. Without it, fadeOut can animate the
|
|
1492
|
+
// loader away while the new page is still rendered with the
|
|
1493
|
+
// previous layout's styles — the article→home flicker the
|
|
1494
|
+
// [TX] trace masked via instrumentation overhead.
|
|
1495
|
+
requestAnimationFrame(function() {
|
|
1496
|
+
$('head').append(function() {
|
|
1497
|
+
$(Settings.identifier).append(function() {
|
|
1498
|
+
callback();
|
|
1499
|
+
dispatchEvent(new Event('transparent:load'));
|
|
1500
|
+
dispatchEvent(new Event('load'));
|
|
1501
|
+
});
|
|
1494
1502
|
});
|
|
1495
1503
|
});
|
|
1496
1504
|
}
|