mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-02 12:19:11 +00:00
Fix scrollable widget not to crash on the server
This commit is contained in:
parent
945ad6792f
commit
79d643775d
@ -20,20 +20,22 @@ var ScrollableWidget = function(parseTreeNode,options) {
|
|||||||
this.addEventListeners([
|
this.addEventListeners([
|
||||||
{type: "tw-scroll", handler: "handleScrollEvent"}
|
{type: "tw-scroll", handler: "handleScrollEvent"}
|
||||||
]);
|
]);
|
||||||
this.requestAnimationFrame = window.requestAnimationFrame ||
|
if($tw.browser) {
|
||||||
window.webkitRequestAnimationFrame ||
|
this.requestAnimationFrame = window.requestAnimationFrame ||
|
||||||
window.mozRequestAnimationFrame ||
|
window.webkitRequestAnimationFrame ||
|
||||||
function(callback) {
|
window.mozRequestAnimationFrame ||
|
||||||
return window.setTimeout(callback, 1000/60);
|
function(callback) {
|
||||||
};
|
return window.setTimeout(callback, 1000/60);
|
||||||
this.cancelAnimationFrame = window.cancelAnimationFrame ||
|
};
|
||||||
window.webkitCancelAnimationFrame ||
|
this.cancelAnimationFrame = window.cancelAnimationFrame ||
|
||||||
window.webkitCancelRequestAnimationFrame ||
|
window.webkitCancelAnimationFrame ||
|
||||||
window.mozCancelAnimationFrame ||
|
window.webkitCancelRequestAnimationFrame ||
|
||||||
window.mozCancelRequestAnimationFrame ||
|
window.mozCancelAnimationFrame ||
|
||||||
function(id) {
|
window.mozCancelRequestAnimationFrame ||
|
||||||
window.clearTimeout(id);
|
function(id) {
|
||||||
};
|
window.clearTimeout(id);
|
||||||
|
};
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user