3 Replies Latest reply on Aug 20, 2016 5:58 PM by Aaron Anderson

    Elemental2 vs E4 dom wrappers

    Hristo Stoyanov Master

      Google made available the first release of 'Elemental 2' in the gwt contributors group. This is JsInterop library generated from the Chrome Dom definitions, I think. Therefore, the Elemental Dom wrappers supersede the (partial) Dom wrappers added in E4.


      What is the thinking about E4 and Elemental 2? Releasing E4 with the current Dom wrappers and then switching to elemental will be a breaking change, imo.



        • 1. Re: Elemental2 vs E4 dom wrappers
          Max Barkley Expert

          Hi Hristo,


          Errai 4 templating and data-binding work with any native JsType that wraps a DOM element. You could start using Elemental 2 wrappers with Errai UI or Data Binding right now if you wanted. This design was intentional so that you can use any DOM wrapper library (or even custom DOM wrappers) so there is no incompatibility.


          What you can't do currently is inject an Elemental 2 wrapper without writing your own producer. We will look into this once the new version becomes more stable.

          • 2. Re: Elemental2 vs E4 dom wrappers
            Hristo Stoyanov Master

            Thanks Max,

            Good to know this is on your radar, and yes, the Google guys are not as fast moving as the awesome Errai team :-)

            My concern was mostly for Errai classes that inherit from your hand-written JsInterop DOM wrappers. If you decide to switch over

            to Elemental 2 DOM wrapper for base classes, this would be a breaking change...

            • 3. Re: Elemental2 vs E4 dom wrappers
              Aaron Anderson Newbie

              It is fairly straight forward to write an IOCExtensionConfigurator that emits JavaScript code to create instances of any JSInterop class you would like. I recently did this for Vaadin Polymer JSInterop classes and it worked well.