Yes, however in a roundabit way. It is not possible to change the html 'manifest' attribute dynamically via javascript. A workaround is generating an iframe via javascript, which references an empty html page with a certain manifest attribute in it (see this topic). For this to work in GWT, you'll need to:
Change the MGWT linker, so for each permutation, you'll create an empty html page with a reference to this permutations manifest. Something like:
toReturn.add(emitString( logger, "<html manifest=\"" + permutation + ".manifest\"><head></head><body></body></html>", permutation + ".manifest.html") );
In your GWT client code, on module load: retrieve your permutation strong-name, and use this to insert the iframe for this permutation. This would look like this:
In your entry class:
public void onModuleLoad() {
appendManifestIframe(GWT.getPermutationStrongName() + ".manifest.html");
}
public static native void appendManifestIframe(String manifestIframe) /*-{
var ifrm = document.createElement("iframe");
ifrm.setAttribute("src", manifestIframe);
ifrm.style.width = 0+"px";
ifrm.style.height = 0+"px";
$doc.body.appendChild(ifrm);
}-*/;
Note that GWT.getPermutationStrongName
returns 'HostedMode' when you are in dev mode. I.e., you won't be able to use this approach in dev mode (or you should make sure you write a separete manifest/iframe for HostedMode
as well)