GWT inject script element into the html file

后端 未结 4 785
予麋鹿
予麋鹿 2021-02-05 23:51

On my gwt project. i have a script that call the dictionary:


i

4条回答
  •  -上瘾入骨i
    2021-02-06 00:16

    The answers form jusio, Dom and Thomas Broyer are all valid here. In my particular case, I was looking to inject a series of polyfill scripts into GWT for some IE8 support we needed when running native JS code. The polyfill scripts needed to be available to the GWT iframe's window context - NOT the host page. To do that, using ScriptInjector was the correct approach as it attaches the script at that level. You can make ScriptInjector install the scripts to a host window by using setWindow(TOP_WINDOW). Adding scripts with the

提交回复
热议问题