|
|
@@ -56,6 +56,7 @@
|
|
|
const requestAnimationFrame = window.requestAnimationFrame;
|
|
|
const cancelAnimationFrame = window.cancelAnimationFrame;
|
|
|
const console = window.console;
|
|
|
+ const warn = console.warn;
|
|
|
|
|
|
const observers = new Map();
|
|
|
const observedElements = new Map();
|
|
|
@@ -228,7 +229,7 @@
|
|
|
let errorDetected;
|
|
|
window.requestAnimationFrame = function (callback) {
|
|
|
if (!warningRequestAnimationFrameDisplayed) {
|
|
|
- console.warn("SingleFile is hooking the requestAnimationFrame and cancelAnimationFrame functions to load deferred images in background tabs."); // eslint-disable-line no-console
|
|
|
+ warn.call(console, "SingleFile is hooking the requestAnimationFrame and cancelAnimationFrame functions to load deferred images in background tabs."); // eslint-disable-line no-console
|
|
|
warningRequestAnimationFrameDisplayed = true;
|
|
|
}
|
|
|
let requestId;
|
|
|
@@ -271,7 +272,7 @@
|
|
|
let warningFontFaceDisplayed;
|
|
|
window.FontFace = function () {
|
|
|
if (!warningFontFaceDisplayed) {
|
|
|
- console.warn("SingleFile is hooking the FontFace constructor to get font URLs."); // eslint-disable-line no-console
|
|
|
+ warn.call(console, "SingleFile is hooking the FontFace constructor to get font URLs."); // eslint-disable-line no-console
|
|
|
warningFontFaceDisplayed = true;
|
|
|
}
|
|
|
const detail = {};
|
|
|
@@ -305,7 +306,7 @@
|
|
|
let warningIntersectionObserverDisplayed;
|
|
|
window.IntersectionObserver = function () {
|
|
|
if (!warningIntersectionObserverDisplayed) {
|
|
|
- console.warn("SingleFile is hooking the IntersectionObserver API to detect and load deferred images."); // eslint-disable-line no-console
|
|
|
+ warn.call(console, "SingleFile is hooking the IntersectionObserver API to detect and load deferred images."); // eslint-disable-line no-console
|
|
|
warningIntersectionObserverDisplayed = true;
|
|
|
}
|
|
|
const intersectionObserver = new IntersectionObserver(...arguments);
|