While compiling java to javascript the gwt creates in default 6 permutations with optimized javascript for the different browsers (chrome, firefox, opera, safari, ie, webkit). doing the same with playn it creates only one permutation. But why and for which browser is it for?
Asked
Active
Viewed 105 times
1 Answers
1
From the PlayN.gwt.xml
: “Your PlayN game should work in Chrome, Firefox 3.6/4.0, Safari, IE9.”
EDIT: this is for JS code using Canvas or WebGL; older IEs are supported through Flash (I can't tell for Opera).
It compiles to a single permutation because it uses runtime-detection (baked into the code, and the resuting permutation) rather than deferred-binding.

Thomas Broyer
- 64,353
- 7
- 91
- 164
-
Thank you Thomas. "Chrome, Firefox 3.6/4.0, Safari, IE9" sounds good. I thought deferred-binding was one of the gwt advantages..? – Rock Solid May 24 '12 at 13:13
-
When browsers are as different as IE6 and Chrome, then yes, it's an advantage. But with things that are very close to each others (here, Canvas and WebGL are really almost the same everywhere), using deferred binding will only make your build slower. Also, deferred binding does not necessarily mean "user agent based", and user-agent sniffing is very controversial (and GWT is now trying to avoid it when possible: see the various `isSupported()` methods in the new "HTML5 support": Audio, Canvas, TypedArrays, etc.) – Thomas Broyer May 24 '12 at 14:38