Jens,
Thanks for reminding me. I have totally forgot this section.
I believe that the document was written before Js.cast and Js.unchecked cast.
Maybe some use cases and some examples would be helpful.
Thanks again.
On Wed, Aug 14, 2019 at 9:58 AM Jens wrote:
>
>
>> It would be great if
> 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.
>
There is a whole section about instanceof/cast
in
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 wrote:
>
>
>> final
> 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
Hi again,
I did create a class MyHTMLDocument that extends HTMLDocument.
However
final MyHTMLDocument doc = Js.cast(DomGlobal.document); <-- this crashes
final MyHTMLDocument doc = Js.uncheckedCast(DomGlobal.document); <-- this works
any idea why uncheckedCast is required?
Thanks
Hi Peter,
Thanks for replying and for pointing me to the github issue.
I am thinking the following strategy.
Create a MyHTMLDocument that extends HTMLDocument and it has the
execCommand but without the @Override annotations.
That way when HTMLDocument gets execDocument implemented I will get a
execCommand is not yet part of elemental2. There is no reason why it should
not be other than the externs need cleaning up. It is on my list of things
to do some time but we don't use it so I haven't got off my kaboose to do
the work. The issue that is tracking this (among other things) is
What about Document.execCommand() ?
On Fri, Aug 9, 2019 at 5:20 PM Vassilis Virvilis wrote:
>
> Hi,
>
> I am looking for Document.createEvent and I can see that createEvent
> is defined in DocumentEvent which is an interface but Document itself
> does not inherit/implement this interface.
>
>
Hi,
I am looking for Document.createEvent and I can see that createEvent
is defined in DocumentEvent which is an interface but Document itself
does not inherit/implement this interface.
I suppose I can cast Document it to DocumentEvent with Js.cast() but
that's ugly.
So what's going on?
I am