Users would expect to have events with source from where event was fired. 
That was source field in GWT events. In your implementation we will need to 
intercept DOM event and fire new event with source field of custom element. 
(e.g re-fire through EventHandler). This is kind of double work. 

  Another thing that we need to care about is if add and then remove some 
custom element from DOM like 
*element.removeChild(customElement.asElement()) *we also need to remove 
reference to custom element to be garbage collected? Since only 
*asElement() *is removed from DOM not custom element object itself. If I'm 
right...

  This is why it would be good if custom element can extends Element and 
wrap inner element like Widget Composite. 

Btw: Great work there with Elemento especially HTML Templates

On Wednesday, October 11, 2017 at 1:54:57 PM UTC+2, Harald Pehl wrote:
>
> We still use the GWT event bus for custom / application scoped events. To 
> listen to DOM event we use what's provided by Elemental2. 
>
> We use a simple interface [1] which is part or Elemento [2] to create 
> custom elements.
>
> [1] 
> https://github.com/hal/elemento/blob/develop/core/src/main/java/org/jboss/gwt/elemento/core/IsElement.java
> [2] https://github.com/hal/elemento/#custom-elements
>
> HTH
> Harald
>
> Am Mittwoch, 11. Oktober 2017 12:22:40 UTC+2 schrieb nikola:
>>
>> *custom events:*
>>
>>  Do we still need EventBus or what was HandlerManager for widgets to fire 
>> and create custom events or we should use element's  *addEventListener *and 
>> native custom events?
>>
>> *custom element:*
>>
>>   I'm missing Composite from GWT Widgets and its *initWidget() *method. Any 
>> idea how we could implement the same behavior with elemental? Elemental's 
>> *Element* is not interface but class so we can't delegate inner element 
>> or something...
>>
>> Thanks,
>> Nikola
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to