From cef90f0b201bb2cd76777e57308f51a23a8e1d0d Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 27 May 2015 17:26:12 -0400 Subject: [PATCH] fixed bad wrapper around seTimeout --- platform/firefox/vapi-client.js | 12 ++++++------ platform/firefox/vapi-common.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index 883f7b6..471bf74 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -39,6 +39,12 @@ vAPI.sessionId = String.fromCharCode(Date.now() % 25 + 97) + /******************************************************************************/ +vAPI.setTimeout = vAPI.setTimeout || function(callback, delay) { + return setTimeout(function() { callback(); }, delay); +}; + +/******************************************************************************/ + vAPI.shutdown = (function() { var jobs = []; @@ -200,12 +206,6 @@ if ( window !== window.top ) { /******************************************************************************/ -vAPI.setTimeout = vAPI.setTimeout || function(callback, delay) { - setTimeout(function() { callback(); }, delay); -}; - -/******************************************************************************/ - })(this); /******************************************************************************/ diff --git a/platform/firefox/vapi-common.js b/platform/firefox/vapi-common.js index 6d03e72..59dccfe 100644 --- a/platform/firefox/vapi-common.js +++ b/platform/firefox/vapi-common.js @@ -41,6 +41,12 @@ self.vAPI = self.vAPI || {}; /******************************************************************************/ +vAPI.setTimeout = vAPI.setTimeout || function(callback, delay) { + return setTimeout(function() { callback(); }, delay); +}; + +/******************************************************************************/ + // http://www.w3.org/International/questions/qa-scripts#directions var setScriptDirection = function(language) { @@ -153,12 +159,6 @@ vAPI.localStorage = { /******************************************************************************/ -vAPI.setTimeout = vAPI.setTimeout || function(callback, delay) { - setTimeout(function() { callback(); }, delay); -}; - -/******************************************************************************/ - })(); /******************************************************************************/