Permalink
Browse files

* Compatibility with webworker-threads

  • Loading branch information...
audreyt committed Dec 24, 2012
1 parent f6b621f commit a92fa38540e304f9624825e5978e1a608544a315
Showing with 8 additions and 0 deletions.
  1. +8 −0 SocialCalcModule.js
View
@@ -25231,6 +25231,14 @@ if (typeof global != 'undefined') var window = global;
if (typeof SocialCalc != 'undefined' && typeof module != 'undefined') module.exports = SocialCalc;
if (typeof document == 'undefined') var document = SocialCalc.document = {};
+// Compatibility with webworker-threads
+if (typeof self !== 'undefined' && self.thread) {
+ window.setTimeout = function (cb, ms) {
+ if (ms <= 1) { self.thread.nextTick(cb); }
+ };
+ window.clearTimeout = function () {};
+}
+
// We don't really need a DOM-based presentation layer for embedded SC.
SocialCalc.GetEditorCellElement = function () {};
SocialCalc.ReplaceCell = function () {};

0 comments on commit a92fa38

Please sign in to comment.