简体   繁体   中英

How to access to functions/variables from GWT code in Javascript?

I am trying to use some functions from a code that has been obfuscated. So i have an html file that is calling a JS file thru the tag:

<script src="gwt_svg_viewer/gwt_svg_viewer.nocache.js"></script>

that file is defining a function called "onScriptdownloaded" which receives a string like this:

gwt_svg_viewer.onScriptDownloaded(["var $wnd = window.parent;function RE(){}"]);

So my question is how can i access to RE? in another JS file?

It seems that there was a kind of GWT code implemented, but i am not really familiar with that.

Variable names and functions in gwt will be obfuscated every time you compile your project, and variables and functions will be renamed in the process, in order to call a gwt code from javascript in a consistence manner you will need to use jsinterop to export java types. more information can be found in the gwt jsinterop documentation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM