Also, feel free to ignore the bit of insanity around virtual shadow roots.
That's just something I built because an older version of webcomponentjs
was severely borked, and I needed to... make my own virtual shadow DOM
implementation. I have allowed it to survive after upstream bug was fixed
It is possible to create web components with "fake" ES2015 classes built
out of raw javascript.
https://github.com/WeTheInternet/xapi/blob/master/gwt/components/src/main/java/xapi/components/impl/WebComponentBuilder.java#L108
Note that the library above depends on a custom fork of Gwt that is no
Web Components require using ES2015 class syntax, so you would need some
trickery make them work from GWT (see
https://github.com/webcomponents/custom-elements#es5-vs-es2015
or
https://github.com/webcomponents/webcomponentsjs#custom-elements-es5-adapterjs)
At least this is the theory…
On Frida
Thanks for the link.. But I can't see what I was looking for..
Can someone please create and register custom web component using only
elemental 2. e.g that says "hello from shadow DOM!".
Cause I'm not able to do it or find working example .. at least without
losing whole week on it...
Thanks
You can try the GWT polymer (web components) wrapper:
https://github.com/manolo/gwt-polymer-elements
Wither you can use built-in polymer components; or create your own (just
look at the source code)
Also take a look at:
https://github.com/manolo/gwt-api-generator
which auto generates GWT api fo
Ok, Thanks! I'll try with web components. As a java programer I'v been
trying to avoid digging too much in javascript but it's inevitable it seems
:)
On Thursday, October 12, 2017 at 12:43:56 PM UTC+2, Thomas Broyer wrote:
>
> This is not how the DOM works I'm afraid. How would your proposed cod
This is not how the DOM works I'm afraid. How would your proposed code
would translate to JS? (feel free to use ES2015 classes for clarity)
(btw, I really do think Web Components would solve your issues, as I see
them)
On Thursday, October 12, 2017 at 12:21:11 PM UTC+2, nikola wrote:
>
>
> When
When I say "custom element" I mean:
*public class *CustomElement *implements *IsElement {
*//private HandlerManager handlerManager; ? *List
*someUserObject*;
*//state object of CustomElement *HTMLElement *root *= Js.*cast*
(DomGlobal.*document*.createElement(*"div"*));
On Wednesday, October 11, 2017 at 4:12:14 PM UTC+2, nikola wrote:
>
>
> 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
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.
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/jb
*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 w
12 matches
Mail list logo