It would be great if there was some documentation that could compare
and spell the differences between
standard cast (), Js.cast(), Js.uncheckedCast() in various use cases
so we could have a list of dos and donts.

   Vassilis

On Mon, Aug 12, 2019 at 4:27 PM Jens <[email protected]> wrote:
>
>
>> final MyHTMLDocument doc = Js.cast(DomGlobal.document);  <-- this crashes
>> final MyHTMLDocument doc = Js.uncheckedCast(DomGlobal.document);  <-- this 
>> works
>
>
> Because the native browser document isn't a MyHTMLDocument? You can only 
> treat it like a MyHTMLDocument by doing a nasty unchecked cast so you can 
> call that method you need.
>
> -- J.
>
> --
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-web-toolkit/de0c434d-6ed6-4205-b674-0aaf697110a0%40googlegroups.com.



-- 
Vassilis Virvilis

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/CAKbOjEwMz8Fre-FGZP%2BiJTqFdAcrAuDtbF9kzwuG2VsaKBa%2B6w%40mail.gmail.com.

Reply via email to