Hi not sure on the usage of shadow dom here, since shadow DOM gives an
encapsulation and would break expected behavior.
The main aim of jsf.js is basically just to provide a communications
mechanism which basically replaces normally parts of the existing dom
without any encapsulation whatsoever.
Shadow dom makes a lot of sense in widget sets however where you can
isolate your own components against the nastyness
of whatever the page designer throws against it.
A usage of shadow dom might need an addition to the spec so that
encapsulation can be enforced. From that point on it would be rather
straight forward I guess since it is not too different from the normal dom
usage.
If I might overlook a usecase where it really can fit without breaking the
spec, then tell me I am very interested.

As for Typescript.

And yes I have thought about reimplementing jsf.js in typescript, but
outside of some initial testing I never really had the incentive so far to
do it, because the existing code, while not being state of the art anymore
and given that it does not use a query engine in some parts is somewhat
ugly, works with minor patches here and there and my time to work on
opensource is limited and covered atm by other projects which are closer to
my current day to day work.

The short term aim for the time being simply was to drop a lot of legacy
code which goes way back even to supporting old Blackberry smartphones and
a load of now extinct (thank god) IE variants. So the baseline of that code
atm is IE11 which still is used in lots of corporate environments.

I am very fond of Typescript however and use it on the Angular(JS) side on
a daily basis with excellent results and simply love it especially you have
optional types and can switch the various Ecmascript levels on the fly,
together with webpack Typescript is an absolute killer solution,  but the
downside is also that Typescript often introduces breaking
additions/changes on language level so if you upgrade the Typescript
version you sometimes have to patch your code (not a lot of work, but still
work)

So it comes down to that my incentive to move the code upward is not really
high atm. Sorry for being a lazy a*** on this one :-)


Werner




Am Mi., 28. Aug. 2019 um 17:01 Uhr schrieb Thomas Andraschko <
[email protected]>:

> Thats up to werner actually.
> We talked about reimplement it with TypeScript but im happy with the
> current master as it received an big cleanup.
>
> About the Shadow Dom support, no idea sorry.
>
> Udo Schnurpfeil <[email protected]> schrieb am Mi., 28. Aug. 2019, 16:35:
>
>> Hi guys,
>>
>> there was a discussion about a refactoring or re-implementation of
>> jsf.js on this list some time ago for MyFaces 3.0.
>>
>> I'm working on the new TypeScript implementation for Tobago 5.0 and I've
>> tested some possibilities to use shadow DOM [1]. The current jsf.js
>> doesn't work with shadow DOM, because e. g. the
>> document.getElementById() function will not find elements inside of any
>> shadow DOM.
>>
>> So, I wonder, if there is a first implementation of a MyFaces 3.0 jsf.js
>> to check, if this works with shadow DOM or it can be adapted to shadow
>> DOM.
>>
>> Regards,
>>
>> Udo
>>
>> [1]
>>
>> https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM
>>
>>
>>

Reply via email to