Hey everyone, I posted this question on the GWT group
here at the beginning of the month, but since I didn't get a reply I'm just cross-posting here :)
Just a quick question regarding JsInterop: how is it proposed to manage javascript functions that can potentially take more than one type of parameter? For example, take
the websocket interface:
@JsType(prototype = "WebSocket")
public interface WebSocket extends EventTarget {
... blah blah.
void send(String data);
// void send(Blob data); <-- JsInterop forbids this
}
I suppose that the following is possible
@JsType(prototype = "WebSocket")
public interface WebSocket extends EventTarget {
void send(Object data);
}
but ... this doesn't seem ideal from a Java perspective :)
Regards,
Ben.