diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/computeScriptBase.js b/dev/codeserver/java/com/google/gwt/dev/codeserver/computeScriptBase.js
index 04fd716..b8f1f53 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/computeScriptBase.js
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/computeScriptBase.js
@@ -35,21 +35,30 @@
 
   var expectedSuffix = '/__MODULE_NAME__.nocache.js';
 
-  var scriptTags = $doc.getElementsByTagName('script');
-  for (var i = 0;; i++) {
-    var tag = scriptTags[i];
-    if (!tag) {
-      break;
-    }
-    var candidate = tag.src;
-    var lastMatch = candidate.lastIndexOf(expectedSuffix);
-    if (lastMatch == candidate.length - expectedSuffix.length) {
-      // Assumes that either the URL is absolute, or it's relative
-      // and the html file is hosted by this code server.
-      return candidate.substring(0, lastMatch + 1);
-    }
+  if (typeof importScripts === 'function') {
+	  return self.__serverUrl__+"/__MODULE_NAME__/";
+	  /*var candidate = self.location.href;
+      var lastMatch = candidate.lastIndexOf(expectedSuffix);
+      if (lastMatch == candidate.length - expectedSuffix.length) {
+        // Assumes that either the URL is absolute, or it's relative
+        // and the html file is hosted by this code server.
+        return candidate.substring(0, lastMatch + 1);
+      }*/
   }
-
+    var scriptTags = $doc.getElementsByTagName('script');
+    for (var i = 0;; i++) {
+      var tag = scriptTags[i];
+      if (!tag) {
+        break;
+      }
+      var candidate = tag.src;
+      var lastMatch = candidate.lastIndexOf(expectedSuffix);
+      if (lastMatch == candidate.length - expectedSuffix.length) {
+        // Assumes that either the URL is absolute, or it's relative
+        // and the html file is hosted by this code server.
+        return candidate.substring(0, lastMatch + 1);
+      }
+    }
   $wnd.alert('Unable to load Super Dev Mode version of __MODULE_NAME__.');
   return null;
 }
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_lib.js b/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_lib.js
index 86e08c7..8e4e8f1 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_lib.js
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_lib.js
@@ -259,10 +259,14 @@
 };
 
 Recompiler.prototype.__injectScriptTag = function(url) {
-  var script = $doc.createElement('script');
-  script.src = url;
-  var $head = $doc.head || $doc.getElementsByTagName('head')[0];
-  $head.appendChild(script);
+  if (typeof importScripts === 'function') {
+	importScripts(url);
+  } else {
+    var script = $doc.createElement('script');
+    script.src = url;
+    var $head = $doc.head || $doc.getElementsByTagName('head')[0];
+    $head.appendChild(script);
+  }
 };
 
 /**
@@ -280,6 +284,12 @@
  * @returns {string} the url of the code server
  */
 Recompiler.prototype.getCodeServerBaseUrl = function() {
+  if (typeof importScripts === 'function') {
+    return self.__serverUrl__+'/';
+/*    var loc = self.location;
+    return loc.protocol+"://"+loc.hostname+":__SUPERDEV_PORT__";*/
+  }
+	
   var scriptTagsToSearch = $doc.getElementsByTagName('script');
   var expectedSuffix = '/recompile-requester/' + this.__moduleName;
   for (var i = 0; i < scriptTagsToSearch.length; i++) {
@@ -296,10 +306,15 @@
  */
 Recompiler.prototype.loadApp = function() {
   var url = this.getCodeServerBaseUrl() + this.__moduleName + '/' + this.__moduleName + '.nocache.js';
-  var scriptTag = $doc.createElement('script');
-  scriptTag.src = url;
-  var $head = $doc.head || $doc.getElementsByTagName('head')[0];
-  $head.insertBefore(scriptTag, $head.firstElementChild || $head.children[0]);
+  
+  if (typeof importScripts === 'function') {
+	importScripts(url);  
+  } else {
+    var scriptTag = $doc.createElement('script');
+    scriptTag.src = url;
+    var $head = $doc.head || $doc.getElementsByTagName('head')[0];
+    $head.insertBefore(scriptTag, $head.firstElementChild || $head.children[0]);
+  }
 };
 
 Recompiler.prototype.getLogUrl = function() {
@@ -416,6 +431,17 @@
 BaseUrlProvider.prototype.getBaseUrl = function() {
   // This code follows the order in com/google/gwt/core/ext/linker/impl/computeScriptBase.js
   // Try to get the url from a meta property first
+	
+  if (typeof importScripts === 'function') {
+    // try the location
+    var expectedSuffix = this.__moduleName + '.nocache.js';
+	var candidate = StringHelper.removeQueryString(self.location.href);
+	if (StringHelper.endsWith(candidate, expectedSuffix)) {
+	  var stripedUrl = this.__stripHashQueryAndFileName(candidate);
+	  return this.__maybeConvertToAbsoluteUrl(stripedUrl);
+	}
+  }
+  
   var url = this.__getBaseUrlFromMetaTag();
   if (url) {
     return this.__maybeConvertToAbsoluteUrl(url);
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_main.js b/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_main.js
index 7ef724e..7598682 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_main.js
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_main.js
@@ -34,7 +34,10 @@
   var metaTagParser = new MetaTagParser(moduleName);
   var propertySource = new PropertySource(moduleName, initPropertyProviders, metaTagParser);
   this.__moduleName = moduleName;
-  this.__dialog = new Dialog();
+
+  if (!(typeof importScripts === 'function'))
+	this.__dialog = new Dialog();
+  
   this.__recompiler = new Recompiler(moduleName, propertySource.computeBindingProperties());
   this.__baseUrlProvider = new BaseUrlProvider(moduleName, metaTagParser);
 }
@@ -52,18 +55,29 @@
     $wnd[moduleBaseKey] = this.__baseUrlProvider.getBaseUrl();
   }
 
-  this.__dialog.clear();
-  this.__dialog.add(this.__dialog.createTextElement("div", "12pt", "Compiling " + this.__moduleName));
-  this.__dialog.show();
-  this.__recompiler.compile(function(result) {
-    that.__dialog.clear();
-    if (result.status != 'ok') {
-      that.__renderError(result);
-    } else {
-      that.__dialog.hide();
-      that.__recompiler.loadApp();
-    }
-  });
+  if (typeof importScripts === 'function') {
+	  this.__recompiler.compile(function(result) {
+	    if (result.status != 'ok') {
+	      console.log("Error when compiling worker")
+	    } else {
+	      that.__recompiler.loadApp();
+	    }
+	  });
+	  
+  } else {
+    this.__dialog.clear();
+    this.__dialog.add(this.__dialog.createTextElement("div", "12pt", "Compiling " + this.__moduleName));
+    this.__dialog.show();
+    this.__recompiler.compile(function(result) {
+      that.__dialog.clear();
+      if (result.status != 'ok') {
+        that.__renderError(result);
+      } else {
+        that.__dialog.hide();
+        that.__recompiler.loadApp();
+      }
+    });
+  }
 };
 
 /**
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_template.js b/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_template.js
index a4954ef..b7aa38c 100644
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_template.js
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/recompile_template.js
@@ -15,8 +15,8 @@
  */
 (function(){
   // Variables declared in this scope will be seen by both recompile_lib and the property providers.
-  var $wnd = window;
-  var $doc = $wnd.document;
+  var $wnd = typeof importScripts === 'function'?self:window;
+  var $doc = typeof importScripts === 'function'?self:$wnd.document;
   var __moduleName = __MODULE_NAME__;
 
   // Because GWT linker architecture allows property providers to use global variables
@@ -37,14 +37,18 @@
     __MAIN__
   };
 
-  if (/loaded|complete/.test($doc.readyState)) {
-    executeMain();
+  if (typeof importScripts === 'function') {
+	executeMain();
   } else {
-    //defer app script insertion until the body is ready
-    if($wnd.addEventListener){
-      $wnd.addEventListener('load', executeMain, false);
-    } else{
-      $wnd.attachEvent('onload', executeMain);
+    if (/loaded|complete/.test($doc.readyState)) {
+      executeMain();
+    } else {
+      //defer app script insertion until the body is ready
+      if($wnd.addEventListener){
+        $wnd.addEventListener('load', executeMain, false);
+      } else{
+        $wnd.attachEvent('onload', executeMain);
+      }
     }
   }
 })();
diff --git a/dev/codeserver/java/com/google/gwt/dev/codeserver/stub.nocache.js b/dev/codeserver/java/com/google/gwt/dev/codeserver/stub.nocache.js
index 4f90b6b..89cd8db 100755
--- a/dev/codeserver/java/com/google/gwt/dev/codeserver/stub.nocache.js
+++ b/dev/codeserver/java/com/google/gwt/dev/codeserver/stub.nocache.js
@@ -18,50 +18,56 @@
  * This startup script is used when we run superdevmode from an app server.
  */
 (function($wnd, $doc){
-  // document.head does not exist in IE8
-  var $head = $doc.head || $doc.getElementsByTagName('head')[0];
   // Compute some codeserver urls so as the user does not need bookmarklets
   var hostName = $wnd.location.hostname;
   var serverUrl = 'http://' + hostName + ':__SUPERDEV_PORT__';
   var module = '__MODULE_NAME__';
   var nocacheUrl = serverUrl + '/recompile-requester/' + module;
 
-  // Insert the superdevmode nocache script in the first position of the head
-  var devModeScript = $doc.createElement('script');
-  devModeScript.src = nocacheUrl;
-
-  // Everybody except IE8 does fire an error event
-  // This means that we do not detect a non running SDM with IE8.
-  if (devModeScript.addEventListener) {
-    var callback = function() {
-      // Don't show the confirmation dialogue twice (multimodule)
-      if (!$wnd.__gwt__sdm__confirmed &&
-           (!$wnd.__gwt_sdm__recompiler || !$wnd.__gwt_sdm__recompiler.loaded)) {
-        $wnd.__gwt__sdm__confirmed = true;
-        if ($wnd.confirm(
-            "Couldn't load " +  module + " from Super Dev Mode\n" +
-            "server at " + serverUrl + ".\n" +
-            "Please make sure this server is ready.\n" +
-            "Do you want to try again?")) {
-          $wnd.location.reload();
-        }
-      }
-    };
-    devModeScript.addEventListener("error", callback, true);
-  }
-
-  var injectScriptTag = function(){
-    $head.insertBefore(devModeScript, $head.firstElementChild || $head.children[0]);
-  };
-
-  if (/loaded|complete/.test($doc.readyState)) {
-    injectScriptTag();
+  if (typeof importScripts === 'function') {
+    self.__serverUrl__ = serverUrl;
+    self.importScripts(nocacheUrl);
   } else {
-    //defer app script insertion until the body is ready
-    if($wnd.addEventListener){
-      $wnd.addEventListener('load', injectScriptTag, false);
-    } else{
-      $wnd.attachEvent('onload', injectScriptTag);
+    // document.head does not exist in IE8
+    var $head = $doc.head || $doc.getElementsByTagName('head')[0];
+
+    // Insert the superdevmode nocache script in the first position of the head
+    var devModeScript = $doc.createElement('script');
+    devModeScript.src = nocacheUrl;
+
+    // Everybody except IE8 does fire an error event
+    // This means that we do not detect a non running SDM with IE8.
+    if (devModeScript.addEventListener) {
+      var callback = function() {
+        // Don't show the confirmation dialogue twice (multimodule)
+        if (!$wnd.__gwt__sdm__confirmed &&
+             (!$wnd.__gwt_sdm__recompiler || !$wnd.__gwt_sdm__recompiler.loaded)) {
+          $wnd.__gwt__sdm__confirmed = true;
+          if ($wnd.confirm(
+              "Couldn't load " +  module + " from Super Dev Mode\n" +
+              "server at " + serverUrl + ".\n" +
+              "Please make sure this server is ready.\n" +
+              "Do you want to try again?")) {
+            $wnd.location.reload();
+          }
+        }
+      };
+      devModeScript.addEventListener("error", callback, true);
+    }
+
+    var injectScriptTag = function(){
+      $head.insertBefore(devModeScript, $head.firstElementChild || $head.children[0]);
+    };
+
+    if (/loaded|complete/.test($doc.readyState)) {
+      injectScriptTag();
+    } else {
+      //defer app script insertion until the body is ready
+      if($wnd.addEventListener){
+        $wnd.addEventListener('load', injectScriptTag, false);
+      } else{
+        $wnd.attachEvent('onload', injectScriptTag);
+      }
     }
   }
-})(window, document);
+})(typeof importScripts === 'function'?self:window, typeof importScripts === 'function'?self:document);
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js b/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js
index 2a1192c..203da9a 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/computeScriptBase.js
@@ -63,7 +63,7 @@
   
 // =============== Various methods to try finding the base =================  
   function tryMetaTag() {
-    var metaVal = __gwt_getMetaProperty('baseUrl');
+    var metaVal = __MODULE_FUNC__.__gwt_getMetaProperty('baseUrl');
     if (metaVal != null) {
       return metaVal;
     }
@@ -71,6 +71,10 @@
   }
     
   function tryNocacheJsTag() {
+    if (typeof importScripts === 'function') {
+      return getDirectoryOfFile(self.location.href);
+    }
+
     // By default, this script looks like something/moduleName.nocache.js
     // so look for a script tag that looks like that
     var scriptTags = $doc.getElementsByTagName('script');
diff --git a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
index f6380df..303ea48 100644
--- a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeLinker.java
@@ -410,7 +410,7 @@
     // By default, $wnd is not set when the module starts, but a replacement for
     // installLocationIframe.js may set it.
 
-    out.print("var $wnd = $wnd || window.parent;");
+    out.print("var $wnd = typeof importScripts === 'function'?self:($wnd || window.parent);");
     out.newlineOpt();
     out.print("var __gwtModuleFunction = $wnd." + context.getModuleFunctionName() + ";");
     out.newlineOpt();
@@ -424,7 +424,7 @@
     out.newlineOpt();
     out.print("var $gwt = {};");
     out.newlineOpt();
-    out.print("var $doc = $wnd.document;");
+    out.print("var $doc = typeof importScripts === 'function'?self:$wnd.document;");
     out.newlineOpt();
     out.print("var $moduleName, $moduleBase;");
     out.newlineOpt();
diff --git a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
index b5af74c..afb0ec7 100644
--- a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
+++ b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
@@ -15,8 +15,8 @@
  */
 __BEGIN_TRY_BLOCK__
 function __MODULE_FUNC__() {
-  var $wnd = __WINDOW_DEF__;
-  var $doc = __DOCUMENT_DEF__;
+  var $wnd = typeof importScripts === 'function'?self:__WINDOW_DEF__;
+  var $doc = typeof importScripts === 'function'?self:__DOCUMENT_DEF__;
 
   sendStats('bootstrap', 'begin');
 
@@ -142,22 +142,30 @@
    ***************************************************************************/
 
   // Must be called before computeScriptBase() and getCompiledFilename()
-  processMetas();
-
+  if (!typeof importScripts === 'function') {
+  	processMetas();
+  }
+  
   // Must be set before getCompiledFilename() is called
   __MODULE_FUNC__.__moduleBase = computeScriptBase();
+  
   activeModules["__MODULE_NAME__"].moduleBase = __MODULE_FUNC__.__moduleBase;
 
   // Must be done right before the "bootstrap" "end" stat is sent
   var filename = getCompiledCodeFilename();
 
   __DEV_MODE_REDIRECT_HOOK__
-
   loadExternalStylesheets();
 
   sendStats('bootstrap', 'end');
 
-  installScript(filename);
+  if (typeof importScripts === 'function') {
+	// Fix com.google.gwt.user.client.DocumentModeAsserter to allow undefined compatMode
+	self.compatMode = "CSS1Compat";  
+	self.importScripts(filename);
+  } else {
+    installScript(filename);
+  }
 
   return true; // success
 }