Closure Dev Mode & Chrome Packaged App — “document.write() is not available in the sandbox of pa

I'm running into issues in development mode with Closure as the security policies for my Chrome Packaged App (i.e., v2 manifest file) are restricting things called in the Closure bootstrap process (e.g., when I load the app using the uncompiled dev code, I get "document.write() is not available in the sandbox of packaged apps").


The following code is what I eventually used and it works great for running Closure in Dev mode within Chrome's Packaged App framework.

In closure/goog/base.js, overwrite goog.global.CLOSURE_IMPORT_SCRIPT as follows:

goog.global.CLOSURE_IMPORT_SCRIPT = function(src) { var script = document.createElement('script'); script.src = src; script.type = 'text/javascript'; goog.global.document.getElementsByTagName("head")[0].appendChild(script); return true; };


  • When does IEnumerable.Any(Func) return a value?
  • Where to create the folder?
  • using android aapt in java program
  • JavaBeans ActiveX Bridge for Java 8?
  • is there any tool to simulate http requests in java
  • Is there a PDF viewer to be used in a DART/Angulardart Chrome Packaged App ?
  • Chrome extension: how to use serial port (now that apps are sunsetting)?
  • Where should I put Velocity template files for a command line utility built with Maven?
  • Can I use the Web Speech API in a Chrome app?
  • Encryption with Core Data in background
  • Is there a way of restricting an API's processor resource in c#?
  • Test if a javax.swing.JButton is pressed down
  • Is it possible to do mash-ups in FirefoxOS?
  • Jar file failing to execute with NullPointerException when it runs fine unpacked
  • Manipulating elements after AJAX load()
  • Presenting NSOpenPanel as sheet synchronously
  • How to detect if user cancel auto-renewable subscriptions during the free trial period?
  • How to map a subdomain to an existing controller action in localhost
  • Bootstrap Popover showing at wrong place upon zoom in/out or resizing Browser window
  • Angular Bootstrap Carousel Slide Transition not working correctly
  • Bootstrap (v3.3.4) glyphicons not displayed in IE when refresh page (F5)
  • C# program and C++ DLL compiled for 32-bit system crash on 64-bit system
  • Loading .coffee files via a view in Rails
  • Create DicomImage from scratch using Dcmtk
  • How can I sort a a table with VBA with given text condition?
  • req.body is undefined - nodejs
  • How to add date and time under each post in guestbook in google app engine
  • Symfony2: How to get request parameter
  • Why winpcap requires both .lib and .dll to run?
  • Akka Routing: Reply's send to router ends up as dead letters
  • Is there a mandatory requirement to switch app.yaml?
  • bootstrap to use multiple ng-app
  • How to set the response of a form post action to a iframe source?
  • Understanding cpu registers
  • coudnt use logback because of log4j
  • How do I configure my settings file to work with unit tests?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • unknown Exception android
  • How to load view controller without button in storyboard?
  • How do I use LINQ to get all the Items that have a particular SubItem?