Do browser permutations matter with JsInterop?

60 views
Skip to first unread message

anb...@gmail.com

unread,
Sep 24, 2020, 2:53:20 PM9/24/20
to GWT Users
If I am using JsInterop and Elemental2 rather than the legacy GWT classes for DOM manipulations, event registration, etc. do I still need to compile permutations for various browsers? Or will different browser permutations essentially compile to the same thing?

Jens

unread,
Sep 25, 2020, 3:55:43 AM9/25/20
to GWT Users
JsInterop is just a convention, so permutations don't make sense here. Elemental2 is generated from a specification, so it does not use permutations. If you use Elemental2 you are responsible to apply polyfills in browsers that do not support the JS features you are using via elemental2. However there might be usages of permutations in other GWT code you might using, things like GWT-RPC, RequestFactory, .....


-- J.

Thomas Broyer

unread,
Sep 25, 2020, 8:14:11 AM9/25/20
to GWT Users
Actually, even Core uses permutations, for exception stacktraces collection: https://github.com/gwtproject/gwt/blob/master/user/src/com/google/gwt/core/CoreWithUserAgent.gwt.xml

Fwiw, if everything compiled down to the same code, there'd be a single *.cache.js output, so it wouldn't matter much whether you compile for various browsers or not (besides compilation time). Seeing more than one *.cache.js means there are differences, and if those differences are minimal you may want to <collapse-all-properties /> or at a minimum <collapse-property name="user.agent" values="*" />

anb...@gmail.com

unread,
Sep 25, 2020, 4:26:51 PM9/25/20
to GWT Users
That's what I was trying to ask: Does Core use permutations, but I didn't know how to phrase it correctly. If it's just used for stack traces then I'm going to collapse all. Thank you!! This will save me a lot of compiling time.
Reply all
Reply to author
Forward
0 new messages