Any chance of reply? If it's a bad question I'm happy to hear that as well, just so I know I'm thinking about this the wrong way.
Regards, Ben. On Friday, 31 July 2015 17:13:32 UTC+10, Benjamin Tillman wrote: > > Hey everyone, I posted this question on the GWT group here > <https://groups.google.com/forum/#!topic/google-web-toolkit/sj3pyJPijB8> > 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 > <http://www.w3.org/TR/websockets/#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. > -- You received this message because you are subscribed to the Google Groups "GWT Contributors" 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-contributors/02188193-4760-48d7-a43f-2331b1fbc377%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
