How to know JS file was loaded success to client

@JavaScript("context://frontend/clientGlobalConfig.js") public class MainView extends Div implements RouterLayout { @Override protected void onAttach(AttachEvent attachEvent) { initGlobalParamsResult = page.executeJs("initGlobalParams($0, $1, $2);", , ,"); initGlobalParamsResult.then(result -> { LOG.debug(result.asString()); }); }

How i sure that my js file clientGlobalConfig.js was loaded success to client before I call client method initGlobalParams ?

I always get result.asString() = null because initGlobalParams is called before JS file loaded into client.

self answer :laughing: : after js file was loaded to client. call back to server for notify