chrome-packaged-apps: prevent document.write