Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>GWT 2.5.1 has finally fixed this problem. The release notes documenting this are here:</p> <p><a href="https://developers.google.com/web-toolkit/release-notes#Release_Notes_2_5_1">https://developers.google.com/web-toolkit/release-notes#Release_Notes_2_5_1</a></p> <p>and they state that:</p> <p>"Apps built with DirectInstallLinker should work in a page where inline scripts are forbidden (e.g. a Chrome extension)"</p> <p>This means that it is now possible to use DirectInstallLinker to link your Chrome packaged app in a manner that satisfies the new security requirements of manifest version 2 regarding inline scripts. That is, by using DirectInstallLinker to link your app with GWT 2.5.1 selected as your GWT version, GWT will not place any script elements inline in its generated Javascript, and thus the new manifest version 2 requirement that there be no inline scripts will not be violated.</p> <p>I have found that SingleScriptLinker also seems to work for my own app; however, Issue 7685 warns against using the SingleScriptLinker because "This generates a $doc.write line which is forbidden in packaged apps." I am using DirectInstallLinker myself. </p> <p>Here is the Javadoc for DirectInstallLinker:</p> <p><a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/core/linker/DirectInstallLinker.html">http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/core/linker/DirectInstallLinker.html</a></p> <p>To use this linker, you can include the following in your *.gwt.xml file:</p> <pre><code>&lt;define-linker name="dil" class="com.google.gwt.core.linker.DirectInstallLinker"/&gt; &lt;add-linker name="dil" /&gt; </code></pre> <p>(dil can be replaced by anything you choose, so long as there are no dashes or other illegal characters).</p> <p>You will need to select GWT 2.5.1 as your version of GWT. If you're using an older version of GWT in an out-of-date version of Eclipse such as Ganymede (as I was), you'll have to upgrade to at least Helios and then import your project to your new Eclipse environment. The archive URLs for the Google Plugin for Eclipse that can be used for the latest three Eclipse versions can be found here:</p> <p><a href="https://developers.google.com/eclipse/docs/download">https://developers.google.com/eclipse/docs/download</a></p> <p>With the above in place, you should be able to set</p> <pre><code>"manifest_version": 2 </code></pre> <p>in your manifest.json file and not experience any errors due to GWT-generated inline Javascript. This should allow your Chrome Web app to be acceptable to the Chrome Web Store (which now requires manifest version 2 for any new apps or for updates to present apps), so long as there are no other issues.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload