Re: JSNI troubles (TypeError)
I tried that too and got the same error.
I was given the javascript code that started like this (where dropBox
was the id of the div)
var dropBox = document.getElementById("dropBox");
addEvent(dropBox, 'drop', droppedHandler);
addEvent(dropBox, 'dragover', allowDrop);
And I was asked to add this to our GWT app where the widget is now a
RichTextArea. Initially I used getElement() and passed that directly
into the init method so the JSNI method used the passed elem
directly...but that gave the same exception. I just don't understand
why.
Thanks,
-Dave
On Aug 22, 3:44 pm, Joseph Lust <lifeofl...@gmail.com> wrote:
> Generally it is an antipattern to reference by id in GWT due to how
> UiBinder works behind the scenes with Id's. Can you pass an element into
> the JSNI method on which to operate?
>
> Sincerely,
> Joseph
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home