瀏覽代碼

added toString methods

Gildas 7 年之前
父節點
當前提交
de5ab98a6a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/hooks/hooks-frame.js

+ 2 - 0
lib/hooks/hooks-frame.js

@@ -152,6 +152,7 @@ this.hooksFrame = this.hooksFrame || (() => {
 				return id;
 			}
 		};
+		window.requestAnimationFrame.toString = function () { return "requestAnimationFrame() { [native code] }"; };
 
 		window.cancelAnimationFrame = function (id) {
 			pendingRequestAnimationFrameCalls.delete(id);
@@ -161,6 +162,7 @@ this.hooksFrame = this.hooksFrame || (() => {
 				return cancelAnimationFrame(id);
 			}
 		};
+		window.cancelAnimationFrame.toString = function () { return "cancelAnimationFrame() { [native code] }"; };
 
 		const FontFace = window.FontFace;
 		let warningFontFaceDisplayed;