1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-08 23:20:03 +00:00

Fix scrollable widget not to crash on the server

This commit is contained in:
Jermolene 2014-03-25 14:37:33 +00:00
parent 945ad6792f
commit 79d643775d

View File

@ -20,6 +20,7 @@ var ScrollableWidget = function(parseTreeNode,options) {
this.addEventListeners([ this.addEventListeners([
{type: "tw-scroll", handler: "handleScrollEvent"} {type: "tw-scroll", handler: "handleScrollEvent"}
]); ]);
if($tw.browser) {
this.requestAnimationFrame = window.requestAnimationFrame || this.requestAnimationFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame || window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame || window.mozRequestAnimationFrame ||
@ -34,6 +35,7 @@ var ScrollableWidget = function(parseTreeNode,options) {
function(id) { function(id) {
window.clearTimeout(id); window.clearTimeout(id);
}; };
}
}; };
/* /*