Hi Thomas,

The ScriptInjector only works 1% of the times, however this:

Document doc = Document.get();
    ScriptElement script = doc.createScriptElement();
    script.setSrc("http://platform.twitter.com/widgets.js";);
    script.setType("text/javascript");
    script.setLang("javascript");
    doc.getBody().appendChild(script);

works 100%, do you have any idea why?


On Tue, May 14, 2013 at 6:51 PM, Thomas Broyer <t.bro...@gmail.com> wrote:

> On Tuesday, May 14, 2013 5:11:26 PM UTC+2, Mohammad Al-Quraian wrote:
>
> Wow that was easier than I expected. One question though, should I inject
>> the script at the beginning of the app or when I instantiate the presenter?
>> I'm expecting the code of the sharing provider to be accessed quite often.
>>
>> The script should be injected each time you add a new Anchor (attached to
> the doc!) so I'd say you should add it to your view's onAttach.
> If it works as well as the one for embedded tweets (which I've used on my
> blog a few times), and there's no reason it wouldn't, injecting the script
> multiple times shouldn't cause conflicts: it'll detect Anchors that have
> already been processed and will only process the others.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Web Toolkit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/TjN9oGZlLag/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to