Skip to content

Commit

Permalink
make IIFE
Browse files Browse the repository at this point in the history
  • Loading branch information
Ten committed Jul 30, 2018
1 parent 32431db commit 0483eb7
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions dynamicreloading/js/main.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
var CSLibrary = new CSInterface();
themeSynchronizer.init();
var mainJSX = CSLibrary.getSystemPath(SystemPath.EXTENSION) + '/jsx/hostscript.jsx';
var script = '$.evalFile("' + mainJSX + '");';
CSLibrary.evalScript(script);

$("#aply").click(function () {
var str = $("input#str").val();
CSLibrary.evalScript('testcall("' + str + '")',
function(re){
alert("alert from CEP side : " + re);
(function(){
'use strict';
var CSLibrary = new CSInterface();
themeSynchronizer.init();
var mainJSX = CSLibrary.getSystemPath(SystemPath.EXTENSION) + '/jsx/hostscript.jsx';
var script = '$.evalFile("' + mainJSX + '");';
CSLibrary.evalScript(script);

$("#aply").click(function () {
var str = $("input#str").val();
CSLibrary.evalScript('testcall("' + str + '")',
function(re){
alert("alert from CEP side : " + re);
});
});
});

})();

0 comments on commit 0483eb7

Please sign in to comment.